Commit 29b43633 authored by Juerg Haefliger's avatar Juerg Haefliger Committed by Kleber Sacilotto de Souza
parent d0fe68e5
......@@ -33,5 +33,12 @@ source "ubuntu/opennsl/Kconfig"
##
##
##
source "ubuntu/bnxt/Kconfig"
##
##
##
##
##
##
endmenu
......@@ -45,6 +45,11 @@ obj-$(CONFIG_OPENNSL) += opennsl/
##
##
##
obj-$(CONFIG_BNXT_BPO) += bnxt/
##
##
##
##
##
##
......
config BNXT
config BNXT_BPO
tristate "Broadcom NetXtreme-C/E support"
depends on PCI
depends on VXLAN || VXLAN=n
......@@ -7,21 +7,21 @@ config BNXT
---help---
This driver supports Broadcom NetXtreme-C/E 10/25/40/50 gigabit
Ethernet cards. To compile this driver as a module, choose M here:
the module will be called bnxt_en. This is recommended.
the module will be called bnxt_en_bpo. This is recommended.
config BNXT_SRIOV
config BNXT_BPO_SRIOV
bool "Broadcom NetXtreme-C/E SR-IOV support"
depends on BNXT && PCI_IOV
depends on BNXT_BPO && PCI_IOV
default y
---help---
This configuration parameter enables Single Root Input Output
Virtualization support in the NetXtreme-C/E products. This
allows for virtual function acceleration in virtual environments.
config BNXT_DCB
config BNXT_BPO_DCB
bool "Data Center Bridging (DCB) Support"
default n
depends on BNXT && DCB
depends on BNXT_BPO && DCB
---help---
Say Y here if you want to use Data Center Bridging (DCB) in the
driver.
......
......@@ -403,9 +403,9 @@ ifneq ($(shell ls $(LINUXSRC)/include/$(UAPI)/linux/net_tstamp.h > /dev/null 2>&
endif
endif
EXTRA_CFLAGS += $(DISTRO_CFLAG) -DCHIMP_FW -DCONFIG_BNXT_FLASHDEV -DHSI_DBG_DISABLE -DCONFIG_BNXT_RE
EXTRA_CFLAGS += $(DISTRO_CFLAG) -DCHIMP_FW -DCONFIG_BNXT_BPO_FLASHDEV -DHSI_DBG_DISABLE -DCONFIG_BNXT_BPO_RE
cflags-y += $(EXTRA_CFLAGS)
obj-$(CONFIG_BNXT) += bnxt_en.o
bnxt_en-y := bnxt.o bnxt_ethtool.o bnxt_sriov.o bnxt_dcb.o bnxt_ulp.o bnxt_xdp.o bnxt_ptp.o #decode_hsi.o
obj-$(CONFIG_BNXT_BPO) += bnxt_en_bpo.o
bnxt_en_bpo-y := bnxt.o bnxt_ethtool.o bnxt_sriov.o bnxt_dcb.o bnxt_ulp.o bnxt_xdp.o bnxt_ptp.o #decode_hsi.o
......@@ -195,7 +195,7 @@ static const struct pci_device_id bnxt_pci_tbl[] = {
{ PCI_VDEVICE(BROADCOM, 0x16ef), .driver_data = BCM57416_NPAR },
{ PCI_VDEVICE(BROADCOM, 0x16f1), .driver_data = BCM57452 },
{ PCI_VDEVICE(BROADCOM, 0x1614), .driver_data = BCM57454 },
#ifdef CONFIG_BNXT_SRIOV
#ifdef CONFIG_BNXT_BPO_SRIOV
{ PCI_VDEVICE(BROADCOM, 0x16c1), .driver_data = NETXTREME_E_VF },
{ PCI_VDEVICE(BROADCOM, 0x16dc), .driver_data = NETXTREME_E_VF },
{ PCI_VDEVICE(BROADCOM, 0x16e1), .driver_data = NETXTREME_C_VF },
......@@ -4186,7 +4186,7 @@ int bnxt_hwrm_vnic_cfg(struct bnxt *bp, u16 vnic_id)
req.mru = cpu_to_le16(bp->dev->mtu + ETH_HLEN + ETH_FCS_LEN +
VLAN_HLEN);
#ifdef CONFIG_BNXT_SRIOV
#ifdef CONFIG_BNXT_BPO_SRIOV
if (BNXT_VF(bp))
def_vlan = bp->vf.vlan;
#endif
......@@ -4852,7 +4852,7 @@ static int bnxt_hwrm_func_qcfg(struct bnxt *bp)
if (rc)
goto func_qcfg_exit;
#ifdef CONFIG_BNXT_SRIOV
#ifdef CONFIG_BNXT_BPO_SRIOV
if (BNXT_VF(bp)) {
struct bnxt_vf_info *vf = &bp->vf;
......@@ -4983,7 +4983,7 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)
if (flags & FUNC_QCAPS_RESP_FLAGS_PTP_SUPPORTED)
__bnxt_hwrm_ptp_qcfg(bp);
} else {
#ifdef CONFIG_BNXT_SRIOV
#ifdef CONFIG_BNXT_BPO_SRIOV
struct bnxt_vf_info *vf = &bp->vf;
vf->fw_fid = le16_to_cpu(resp->fid);
......@@ -5337,7 +5337,7 @@ static int bnxt_alloc_rfs_vnics(struct bnxt *bp)
/* Allow PF and VF with default VLAN to be in promiscuous mode */
static bool bnxt_promisc_ok(struct bnxt *bp)
{
#ifdef CONFIG_BNXT_SRIOV
#ifdef CONFIG_BNXT_BPO_SRIOV
if (BNXT_VF(bp) && !bp->vf.vlan)
return false;
#endif
......@@ -5603,7 +5603,7 @@ static int bnxt_setup_int_mode(struct bnxt *bp)
#ifdef CONFIG_RFS_ACCEL
static unsigned int bnxt_get_max_func_rss_ctxs(struct bnxt *bp)
{
#if defined(CONFIG_BNXT_SRIOV)
#if defined(CONFIG_BNXT_BPO_SRIOV)
if (BNXT_VF(bp))
return bp->vf.max_rsscos_ctxs;
#endif
......@@ -5612,7 +5612,7 @@ static unsigned int bnxt_get_max_func_rss_ctxs(struct bnxt *bp)
static unsigned int bnxt_get_max_func_vnics(struct bnxt *bp)
{
#if defined(CONFIG_BNXT_SRIOV)
#if defined(CONFIG_BNXT_BPO_SRIOV)
if (BNXT_VF(bp))
return bp->vf.max_vnics;
#endif
......@@ -5622,7 +5622,7 @@ static unsigned int bnxt_get_max_func_vnics(struct bnxt *bp)
unsigned int bnxt_get_max_func_stat_ctxs(struct bnxt *bp)
{
#if defined(CONFIG_BNXT_SRIOV)
#if defined(CONFIG_BNXT_BPO_SRIOV)
if (BNXT_VF(bp))
return bp->vf.max_stat_ctxs;
#endif
......@@ -5631,7 +5631,7 @@ unsigned int bnxt_get_max_func_stat_ctxs(struct bnxt *bp)
void bnxt_set_max_func_stat_ctxs(struct bnxt *bp, unsigned int max)
{
#if defined(CONFIG_BNXT_SRIOV)
#if defined(CONFIG_BNXT_BPO_SRIOV)
if (BNXT_VF(bp))
bp->vf.max_stat_ctxs = max;
else
......@@ -5641,7 +5641,7 @@ void bnxt_set_max_func_stat_ctxs(struct bnxt *bp, unsigned int max)
unsigned int bnxt_get_max_func_cp_rings(struct bnxt *bp)
{
#if defined(CONFIG_BNXT_SRIOV)
#if defined(CONFIG_BNXT_BPO_SRIOV)
if (BNXT_VF(bp))
return bp->vf.max_cp_rings;
#endif
......@@ -5650,7 +5650,7 @@ unsigned int bnxt_get_max_func_cp_rings(struct bnxt *bp)
void bnxt_set_max_func_cp_rings(struct bnxt *bp, unsigned int max)
{
#if defined(CONFIG_BNXT_SRIOV)
#if defined(CONFIG_BNXT_BPO_SRIOV)
if (BNXT_VF(bp))
bp->vf.max_cp_rings = max;
else
......@@ -5660,7 +5660,7 @@ void bnxt_set_max_func_cp_rings(struct bnxt *bp, unsigned int max)
static unsigned int bnxt_get_max_func_irqs(struct bnxt *bp)
{
#if defined(CONFIG_BNXT_SRIOV)
#if defined(CONFIG_BNXT_BPO_SRIOV)
if (BNXT_VF(bp))
return min_t(unsigned int, bp->vf.max_irqs,
bp->vf.max_cp_rings);
......@@ -5670,7 +5670,7 @@ static unsigned int bnxt_get_max_func_irqs(struct bnxt *bp)
void bnxt_set_max_func_irqs(struct bnxt *bp, unsigned int max_irqs)
{
#if defined(CONFIG_BNXT_SRIOV)
#if defined(CONFIG_BNXT_BPO_SRIOV)
if (BNXT_VF(bp))
bp->vf.max_irqs = max_irqs;
else
......@@ -6673,7 +6673,7 @@ int bnxt_close_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init)
{
int rc = 0;
#ifdef CONFIG_BNXT_SRIOV
#ifdef CONFIG_BNXT_BPO_SRIOV
if (bp->sriov_cfg) {
rc = wait_event_interruptible_timeout(bp->sriov_cfg_wait,
!bp->sriov_cfg,
......@@ -7107,7 +7107,7 @@ static netdev_features_t bnxt_fix_features(struct net_device *dev,
features |= NETIF_F_HW_VLAN_CTAG_RX |
NETIF_F_HW_VLAN_STAG_RX;
}
#ifdef CONFIG_BNXT_SRIOV
#ifdef CONFIG_BNXT_BPO_SRIOV
if (BNXT_VF(bp)) {
if (bp->vf.vlan) {
features &= ~(NETIF_F_HW_VLAN_CTAG_RX |
......@@ -7832,7 +7832,7 @@ static int bnxt_change_mtu(struct net_device *dev, int new_mtu)
return 0;
}
#if defined(HAVE_SETUP_TC) || defined(CONFIG_BNXT_DCB)
#if defined(HAVE_SETUP_TC) || defined(CONFIG_BNXT_BPO_DCB)
int bnxt_setup_mq_tc(struct net_device *dev, u8 tc)
{
struct bnxt *bp = netdev_priv(dev);
......@@ -8338,7 +8338,7 @@ static const struct net_device_ops bnxt_netdev_ops = {
.ndo_set_features = bnxt_set_features,
#endif
.ndo_tx_timeout = bnxt_tx_timeout,
#ifdef CONFIG_BNXT_SRIOV
#ifdef CONFIG_BNXT_BPO_SRIOV
#ifdef HAVE_NDO_GET_VF_CONFIG
.ndo_get_vf_config = bnxt_get_vf_config,
.ndo_set_vf_mac = bnxt_set_vf_mac,
......@@ -8492,7 +8492,7 @@ static void _bnxt_get_max_rings(struct bnxt *bp, int *max_rx, int *max_tx,
{
int max_ring_grps = 0;
#ifdef CONFIG_BNXT_SRIOV
#ifdef CONFIG_BNXT_BPO_SRIOV
if (!BNXT_PF(bp)) {
*max_tx = bp->vf.max_tx_rings;
*max_rx = bp->vf.max_rx_rings;
......@@ -8547,7 +8547,7 @@ static int bnxt_get_dflt_rings(struct bnxt *bp, int *max_rx, int *max_tx,
bp->dev->features &= ~NETIF_F_LRO;
bnxt_set_ring_params(bp);
}
#ifdef CONFIG_BNXT_RE
#ifdef CONFIG_BNXT_BPO_RE
if (bp->flags & BNXT_FLAG_ROCE_CAP) {
int max_cp, max_stat, max_irq;
......@@ -8717,7 +8717,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dev->max_mtu = BNXT_MAX_MTU;
#endif
#ifdef CONFIG_BNXT_SRIOV
#ifdef CONFIG_BNXT_BPO_SRIOV
init_waitqueue_head(&bp->sriov_cfg_wait);
#endif
bp->gro_func = bnxt_gro_func_5730x;
......@@ -9036,7 +9036,7 @@ static struct pci_driver bnxt_pci_driver = {
.shutdown = bnxt_shutdown,
.driver.pm = BNXT_PM_OPS,
.err_handler = &bnxt_err_handler,
#if defined(CONFIG_BNXT_SRIOV) && defined(PCIE_SRIOV_CONFIGURE)
#if defined(CONFIG_BNXT_BPO_SRIOV) && defined(PCIE_SRIOV_CONFIGURE)
.sriov_configure = bnxt_sriov_configure,
#endif
};
......
......@@ -11,7 +11,7 @@
#ifndef BNXT_H
#define BNXT_H
#define DRV_MODULE_NAME "bnxt_en"
#define DRV_MODULE_NAME "bnxt_en_bpo"
#define DRV_MODULE_VERSION "1.8.1"
#define DRV_VER_MAJ 1
......@@ -755,7 +755,7 @@ struct bnxt_vnic_info {
#define BNXT_VNIC_RFS_NEW_RSS_FLAG 0x10
};
#if defined(CONFIG_BNXT_SRIOV)
#if defined(CONFIG_BNXT_BPO_SRIOV)
struct bnxt_vf_info {
u16 fw_fid;
u8 mac_addr[ETH_ALEN];
......@@ -1126,12 +1126,12 @@ struct bnxt {
int total_irqs;
u8 mac_addr[ETH_ALEN];
#ifdef CONFIG_BNXT_DCB
#ifdef CONFIG_BNXT_BPO_DCB
struct ieee_pfc *ieee_pfc;
struct ieee_ets *ieee_ets;
u8 dcbx_cap;
u8 default_pri;
#endif /* CONFIG_BNXT_DCB */
#endif /* CONFIG_BNXT_BPO_DCB */
u32 msg_enable;
......@@ -1202,7 +1202,7 @@ struct bnxt {
#define BNXT_LINK_SPEED_CHNG_SP_EVENT 14
struct bnxt_pf_info pf;
#ifdef CONFIG_BNXT_SRIOV
#ifdef CONFIG_BNXT_BPO_SRIOV
int nr_vfs;
struct bnxt_vf_info vf;
wait_queue_head_t sriov_cfg_wait;
......@@ -1413,7 +1413,7 @@ void bnxt_half_close_nic(struct bnxt *bp);
int bnxt_close_nic(struct bnxt *, bool, bool);
int bnxt_reserve_rings(struct bnxt *bp, int tx, int rx, bool sh, int tcs,
int tx_xdp);
#if defined(HAVE_SETUP_TC) || defined(CONFIG_BNXT_DCB)
#if defined(HAVE_SETUP_TC) || defined(CONFIG_BNXT_BPO_DCB)
int bnxt_setup_mq_tc(struct net_device *, u8);
#endif
int bnxt_get_max_rings(struct bnxt *, int *, int *, bool);
......
......@@ -286,7 +286,7 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, enum pkt_hash_types type)
#endif
#if !defined(IEEE_8021QAZ_APP_SEL_DGRAM) || !defined(CONFIG_DCB)
#undef CONFIG_BNXT_DCB
#undef CONFIG_BNXT_BPO_DCB
#endif
#ifdef NETDEV_UDP_TUNNEL_PUSH_INFO
......@@ -294,7 +294,7 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, enum pkt_hash_types type)
#endif
#ifdef HAVE_NDO_XDP
#define CONFIG_BNXT_XDP 1
#define CONFIG_BNXT_BPO_XDP 1
#endif
#ifndef NETDEV_HW_FEATURES
......
......@@ -20,7 +20,7 @@
#include "bnxt.h"
#include "bnxt_dcb.h"
#ifdef CONFIG_BNXT_DCB
#ifdef CONFIG_BNXT_BPO_DCB
static int bnxt_hwrm_queue_pri2cos_cfg(struct bnxt *bp, struct ieee_ets *ets)
{
struct hwrm_queue_pri2cos_cfg_input req = {0};
......
......@@ -30,7 +30,7 @@
#include "bnxt_xdp.h"
#include "bnxt_ptp.h"
#include "bnxt_ethtool.h"
#ifdef CONFIG_BNXT_FLASHDEV
#ifdef CONFIG_BNXT_BPO_FLASHDEV
#include "bnxt_nvm_defs.h" /* NVRAM content constant and structure defs */
#include "bnxt_fw_hdr.h" /* Firmware hdr constant and structure defs */
#define FLASH_NVRAM_TIMEOUT ((HWRM_CMD_TIMEOUT) * 100)
......@@ -1538,7 +1538,7 @@ static u32 bnxt_get_link(struct net_device *dev)
return bp->link_info.link_up;
}
#ifdef CONFIG_BNXT_FLASHDEV
#ifdef CONFIG_BNXT_BPO_FLASHDEV
static int bnxt_find_nvram_item(struct net_device *dev, u16 type, u16 ordinal,
u16 ext, u16 *index, u32 *item_length,
u32 *data_length);
......@@ -2920,7 +2920,7 @@ const struct ethtool_ops bnxt_ethtool_ops = {
.get_rxfh_key_size = bnxt_get_rxfh_key_size,
.get_rxfh = bnxt_get_rxfh,
#endif
#ifdef CONFIG_BNXT_FLASHDEV
#ifdef CONFIG_BNXT_BPO_FLASHDEV
.flash_device = bnxt_flash_device,
.get_eeprom_len = bnxt_get_eeprom_len,
.get_eeprom = bnxt_get_eeprom,
......
......@@ -22,7 +22,7 @@
#include "bnxt_sriov.h"
#include "bnxt_ethtool.h"
#ifdef CONFIG_BNXT_SRIOV
#ifdef CONFIG_BNXT_BPO_SRIOV
static int bnxt_hwrm_fwd_async_event_cmpl(struct bnxt *bp,
struct bnxt_vf_info *vf,
u16 event_id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment