1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
2 /* Copyright (C) 2023 Corigine, Inc. */
5 #define __NFP_NIC_H__ 1
7 #include <linux/netdevice.h>
10 /* DCB feature definitions */
11 #define NFP_NET_MAX_DSCP 64
12 #define NFP_NET_MAX_TC IEEE_8021QAZ_MAX_TCS
13 #define NFP_NET_MAX_PRIO 8
14 #define NFP_DCB_CFG_STRIDE 256
17 u8 dscp2prio
[NFP_NET_MAX_DSCP
];
18 u8 prio2tc
[NFP_NET_MAX_PRIO
];
19 u8 tc2idx
[IEEE_8021QAZ_MAX_TCS
];
20 u64 tc_maxrate
[IEEE_8021QAZ_MAX_TCS
];
21 u8 tc_tx_pct
[IEEE_8021QAZ_MAX_TCS
];
22 u8 tc_tsa
[IEEE_8021QAZ_MAX_TCS
];
28 struct nfp_cpp_area
*dcbcfg_tbl_area
;
29 u8 __iomem
*dcbcfg_tbl
;
33 int nfp_nic_dcb_init(struct nfp_net
*nn
);
34 void nfp_nic_dcb_clean(struct nfp_net
*nn
);
36 static inline int nfp_nic_dcb_init(struct nfp_net
*nn
) { return 0; }
37 static inline void nfp_nic_dcb_clean(struct nfp_net
*nn
) {}
40 struct nfp_app_nic_private
{