Re: [PATCH net v4 1/2] octeontx2-pf: Fix aura BPID assignment when CONFIG_DCB is enabled

Simon Horman <[email protected]>
Newsgroups org.kernel.vger.netdev,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, Aug 18, 2026 at 02:41:22PM +0530, Subrat Pandey wrote:

...

> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
> index eecee612b7b2..f39b293cc837 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
> @@ -1029,6 +1029,14 @@ static inline int otx2_tc_flower_rule_cnt(struct otx2_nic *pfvf)
>  	return pfvf->flow_cfg->nr_flows;
>  }
>  
> +static inline u8 otx2_get_bpid_idx(struct otx2_nic *pfvf, int qidx)
> +{
> +	if (IS_ENABLED(CONFIG_DCB))
> +		return pfvf->queue_to_pfc_map[qidx];
> +
> +	return 0;
> +}
> +

Hi,

As pointed out by sashiko.dev [1], this will not compile if
CONFIG_DCB is not defined because the compiler will
evaluate pfvf->queue_to_pfc_map, and that field doesn't exist
without CONFIG_DCB set.

[1] https://sashiko.dev/#/patchset/20260818091124.1832237-1-subratp%40marvell.com

-- 
pw-bot: changes-requested
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.