Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
47 lines
1.0 KiB
C
47 lines
1.0 KiB
C
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
|
|
/* Copyright (C) 2023 Corigine, Inc. */
|
|
|
|
#ifndef __NFP_NIC_H__
|
|
#define __NFP_NIC_H__ 1
|
|
|
|
#include <linux/netdevice.h>
|
|
|
|
#ifdef CONFIG_DCB
|
|
/* DCB feature definitions */
|
|
#define NFP_NET_MAX_DSCP 64
|
|
#define NFP_NET_MAX_TC IEEE_8021QAZ_MAX_TCS
|
|
#define NFP_NET_MAX_PRIO 8
|
|
#define NFP_DCB_CFG_STRIDE 256
|
|
|
|
struct nfp_dcb {
|
|
u8 dscp2prio[NFP_NET_MAX_DSCP];
|
|
u8 prio2tc[NFP_NET_MAX_PRIO];
|
|
u8 tc2idx[IEEE_8021QAZ_MAX_TCS];
|
|
u64 tc_maxrate[IEEE_8021QAZ_MAX_TCS];
|
|
u8 tc_tx_pct[IEEE_8021QAZ_MAX_TCS];
|
|
u8 tc_tsa[IEEE_8021QAZ_MAX_TCS];
|
|
u8 dscp_cnt;
|
|
u8 trust_status;
|
|
bool rate_init;
|
|
bool ets_init;
|
|
|
|
struct nfp_cpp_area *dcbcfg_tbl_area;
|
|
u8 __iomem *dcbcfg_tbl;
|
|
u32 cfg_offset;
|
|
};
|
|
|
|
int nfp_nic_dcb_init(struct nfp_net *nn);
|
|
void nfp_nic_dcb_clean(struct nfp_net *nn);
|
|
#else
|
|
static inline int nfp_nic_dcb_init(struct nfp_net *nn) { return 0; }
|
|
static inline void nfp_nic_dcb_clean(struct nfp_net *nn) {}
|
|
#endif
|
|
|
|
struct nfp_app_nic_private {
|
|
#ifdef CONFIG_DCB
|
|
struct nfp_dcb dcb;
|
|
#endif
|
|
};
|
|
|
|
#endif
|