On Wed, Jun 21, 2023 at 10:02:36AM -0700, Stanislav Fomichev wrote: ... > @@ -1137,6 +1145,27 @@ static int xsk_setsockopt(struct socket *sock, int level, int optname, > mutex_unlock(&xs->mutex); > return err; > } > + case XDP_TX_METADATA_LEN: > + { > + int val; > + > + if (optlen < sizeof(val)) > + return -EINVAL; > + if (copy_from_sockptr(&val, optval, sizeof(val))) > + return -EFAULT; > + > + if (val >= 256) > + return -EINVAL; > + > + mutex_lock(&xs->mutex); > + if (xs->state != XSK_READY) { > + mutex_unlock(&xs->mutex); > + return -EBUSY; > + } > + xs->tx_metadata_len = val; > + mutex_unlock(&xs->mutex); > + return err; Hi Stan, clang-16 complains that err is used uninitialised here. net/xdp/xsk.c:1167:10: warning: variable 'err' is uninitialized when used here [-Wuninitialized] return err; ^~~ net/xdp/xsk.c:1065:9: note: initialize the variable 'err' to silence this warning int err; ^ = 0 > + } > default: > break; > } ...