Re: [net-next PATCH v5 6/6] octeontx2-pf: AF_XDP zero copy transmit support

From: kernel test robot
Date: Fri Feb 07 2025 - 06:41:13 EST


Hi Suman,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url: https://github.com/intel-lab-lkp/linux/commits/Suman-Ghosh/octeontx2-pf-use-xdp_return_frame-to-free-xdp-buffers/20250206-165634
base: net-next/main
patch link: https://lore.kernel.org/r/20250206085034.1978172-7-sumang%40marvell.com
patch subject: [net-next PATCH v5 6/6] octeontx2-pf: AF_XDP zero copy transmit support
config: x86_64-buildonly-randconfig-006-20250207 (https://download.01.org/0day-ci/archive/20250207/202502071925.3T93J9MM-lkp@xxxxxxxxx/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250207/202502071925.3T93J9MM-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502071925.3T93J9MM-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c:112:6: warning: variable 'iova' set but not used [-Wunused-but-set-variable]
112 | u64 iova;
| ^
1 warning generated.


vim +/iova +112 drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c

104
105 static void otx2_xdp_snd_pkt_handler(struct otx2_nic *pfvf,
106 struct otx2_snd_queue *sq,
107 struct nix_cqe_tx_s *cqe,
108 int *xsk_frames)
109 {
110 struct nix_send_comp_s *snd_comp = &cqe->comp;
111 struct sg_list *sg;
> 112 u64 iova;
113
114 sg = &sq->sg[snd_comp->sqe_id];
115
116 if (sg->flags & OTX2_AF_XDP_FRAME) {
117 (*xsk_frames)++;
118 return;
119 }
120
121 iova = sg->dma_addr[0];
122 if (sg->flags & OTX2_XDP_REDIRECT)
123 otx2_dma_unmap_page(pfvf, sg->dma_addr[0], sg->size[0], DMA_TO_DEVICE);
124 xdp_return_frame((struct xdp_frame *)sg->skb);
125 sg->skb = (u64)NULL;
126 }
127

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki