Thread (2 messages) flat view 2 messages, 2 authors, 1d ago

Re: [PATCH net] octeontx2-af: nix: Remove redundant BPID setup from block init

From: kernel test robot <hidden>
Date: 2026-09-15 23:10:17
Also in: lkml, oe-kbuild-all

Hi Ratheesh,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Ratheesh-Kannoth/octeontx2-af-nix-Remove-redundant-BPID-setup-from-block-init/20260915-125029
base:   net/main
patch link:    https://lore.kernel.org/r/20260915072029.975824-1-rkannoth%40marvell.com
patch subject: [PATCH net] octeontx2-af: nix: Remove redundant BPID setup from block init
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20260916/202609160743.DeZuvi8V-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260916/202609160743.DeZuvi8V-lkp@intel.com/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 [off-list ref]
| Closes: https://lore.kernel.org/oe-kbuild-all/202609160743.DeZuvi8V-lkp@intel.com/ (local)

All warnings (new ones prefixed by >>):
quoted
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c:516:12: warning: 'nix_setup_bpids' defined but not used [-Wunused-function]
     516 | static int nix_setup_bpids(struct rvu *rvu, struct nix_hw *hw, int blkaddr)
         |            ^~~~~~~~~~~~~~~


vim +/nix_setup_bpids +516 drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c

4b05528ebf0c3f Sunil Goutham   2018-10-22  513  
d6212d2e41a0cb Geetha sowjanya 2024-01-31  514  #define NIX_BPIDS_PER_LMAC	8
d6212d2e41a0cb Geetha sowjanya 2024-01-31  515  #define NIX_BPIDS_PER_CPT	1
d6212d2e41a0cb Geetha sowjanya 2024-01-31 @516  static int nix_setup_bpids(struct rvu *rvu, struct nix_hw *hw, int blkaddr)
d6212d2e41a0cb Geetha sowjanya 2024-01-31  517  {
d6212d2e41a0cb Geetha sowjanya 2024-01-31  518  	struct nix_bp *bp = &hw->bp;
d6212d2e41a0cb Geetha sowjanya 2024-01-31  519  	int err, max_bpids;
d6212d2e41a0cb Geetha sowjanya 2024-01-31  520  	u64 cfg;
d6212d2e41a0cb Geetha sowjanya 2024-01-31  521  
d6212d2e41a0cb Geetha sowjanya 2024-01-31  522  	cfg = rvu_read64(rvu, blkaddr, NIX_AF_CONST1);
d6212d2e41a0cb Geetha sowjanya 2024-01-31  523  	max_bpids =  FIELD_GET(NIX_CONST_MAX_BPIDS, cfg);
d6212d2e41a0cb Geetha sowjanya 2024-01-31  524  
d6212d2e41a0cb Geetha sowjanya 2024-01-31  525  	/* Reserve the BPIds for CGX and SDP */
d6212d2e41a0cb Geetha sowjanya 2024-01-31  526  	bp->cgx_bpid_cnt = rvu->hw->cgx_links * NIX_BPIDS_PER_LMAC;
d6212d2e41a0cb Geetha sowjanya 2024-01-31  527  	bp->sdp_bpid_cnt = rvu->hw->sdp_links * FIELD_GET(NIX_CONST_SDP_CHANS, cfg);
d6212d2e41a0cb Geetha sowjanya 2024-01-31  528  	bp->free_pool_base = bp->cgx_bpid_cnt + bp->sdp_bpid_cnt +
d6212d2e41a0cb Geetha sowjanya 2024-01-31  529  			     NIX_BPIDS_PER_CPT;
d6212d2e41a0cb Geetha sowjanya 2024-01-31  530  	bp->bpids.max = max_bpids - bp->free_pool_base;
d6212d2e41a0cb Geetha sowjanya 2024-01-31  531  
d6212d2e41a0cb Geetha sowjanya 2024-01-31  532  	err = rvu_alloc_bitmap(&bp->bpids);
d6212d2e41a0cb Geetha sowjanya 2024-01-31  533  	if (err)
d6212d2e41a0cb Geetha sowjanya 2024-01-31  534  		return err;
d6212d2e41a0cb Geetha sowjanya 2024-01-31  535  
d6212d2e41a0cb Geetha sowjanya 2024-01-31  536  	bp->fn_map = devm_kcalloc(rvu->dev, bp->bpids.max,
d6212d2e41a0cb Geetha sowjanya 2024-01-31  537  				  sizeof(u16), GFP_KERNEL);
d6212d2e41a0cb Geetha sowjanya 2024-01-31  538  	if (!bp->fn_map)
36323f54cd3231 Haoxiang Li     2026-06-23  539  		goto free_bpids;
d6212d2e41a0cb Geetha sowjanya 2024-01-31  540  
d6212d2e41a0cb Geetha sowjanya 2024-01-31  541  	bp->intf_map = devm_kcalloc(rvu->dev, bp->bpids.max,
d6212d2e41a0cb Geetha sowjanya 2024-01-31  542  				    sizeof(u8), GFP_KERNEL);
d6212d2e41a0cb Geetha sowjanya 2024-01-31  543  	if (!bp->intf_map)
36323f54cd3231 Haoxiang Li     2026-06-23  544  		goto free_bpids;
d6212d2e41a0cb Geetha sowjanya 2024-01-31  545  
d6212d2e41a0cb Geetha sowjanya 2024-01-31  546  	bp->ref_cnt = devm_kcalloc(rvu->dev, bp->bpids.max,
d6212d2e41a0cb Geetha sowjanya 2024-01-31  547  				   sizeof(u8), GFP_KERNEL);
d6212d2e41a0cb Geetha sowjanya 2024-01-31  548  	if (!bp->ref_cnt)
36323f54cd3231 Haoxiang Li     2026-06-23  549  		goto free_bpids;
d6212d2e41a0cb Geetha sowjanya 2024-01-31  550  
d6212d2e41a0cb Geetha sowjanya 2024-01-31  551  	return 0;
36323f54cd3231 Haoxiang Li     2026-06-23  552  
36323f54cd3231 Haoxiang Li     2026-06-23  553  free_bpids:
36323f54cd3231 Haoxiang Li     2026-06-23  554  	rvu_free_bitmap(&bp->bpids);
36323f54cd3231 Haoxiang Li     2026-06-23  555  	bp->bpids.bmap = NULL;
36323f54cd3231 Haoxiang Li     2026-06-23  556  	return -ENOMEM;
d6212d2e41a0cb Geetha sowjanya 2024-01-31  557  }
d6212d2e41a0cb Geetha sowjanya 2024-01-31  558  

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help