Hi Xuan, Thank you for the patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Xuan-Zhuo/xsk-build-skb-by-page/20210116-105116 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master config: sh-allmodconfig (attached as .config) compiler: sh4-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/ee139d2988e5c5945108889a7c95c751910c1877 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Xuan-Zhuo/xsk-build-skb-by-page/20210116-105116 git checkout ee139d2988e5c5945108889a7c95c751910c1877 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): net/xdp/xsk.c: In function 'xsk_build_skb': >> net/xdp/xsk.c:497:4: error: invalid type argument of unary '*' (have 'int') 497 | *err = -ENOMEM; | ^~~~ net/xdp/xsk.c:508:4: error: invalid type argument of unary '*' (have 'int') 508 | *err = -EINVAL; | ^~~~ net/xdp/xsk.c:490:7: warning: variable 'addr' set but not used [-Wunused-but-set-variable] 490 | u64 addr; | ^~~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC Depends on SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && HAS_DMA Selected by - SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC - SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && ATMEL_SSC vim +497 net/xdp/xsk.c 476 477 static struct sk_buff *xsk_build_skb(struct xdp_sock *xs, 478 struct xdp_desc *desc, int *err) 479 { 480 struct sk_buff *skb; 481 482 if (xs->dev->features & NETIF_F_SKB_NO_LINEAR) { 483 skb = xsk_build_skb_zerocopy(xs, desc); 484 if (unlikely(!skb)) { 485 *err = -ENOMEM; 486 return NULL; 487 } 488 } else { 489 char *buffer; 490 u64 addr; 491 u32 len; 492 int err; 493 494 len = desc->len; 495 skb = sock_alloc_send_skb(&xs->sk, len, 1, &err); 496 if (unlikely(!skb)) { > 497 *err = -ENOMEM; 498 return NULL; 499 } 500 501 skb_put(skb, len); 502 addr = desc->addr; 503 buffer = xsk_buff_raw_get_data(xs->pool, desc->addr); 504 err = skb_store_bits(skb, 0, buffer, len); 505 506 if (unlikely(err)) { 507 kfree_skb(skb); 508 *err = -EINVAL; 509 return NULL; 510 } 511 } 512 513 skb->dev = xs->dev; 514 skb->priority = xs->sk.sk_priority; 515 skb->mark = xs->sk.sk_mark; 516 skb_shinfo(skb)->destructor_arg = (void *)(long)desc->addr; 517 skb->destructor = xsk_destruct_skb; 518 519 return skb; 520 } 521 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org