Commit 87da7f79 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

bnxt_en: Add UDP RSS support for 57X1X chips.

The newer chips have proper support for 4-tuple UDP RSS.
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 286ef9d6
...@@ -3425,13 +3425,7 @@ static int bnxt_hwrm_vnic_set_rss(struct bnxt *bp, u16 vnic_id, bool set_rss) ...@@ -3425,13 +3425,7 @@ static int bnxt_hwrm_vnic_set_rss(struct bnxt *bp, u16 vnic_id, bool set_rss)
bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VNIC_RSS_CFG, -1, -1); bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VNIC_RSS_CFG, -1, -1);
if (set_rss) { if (set_rss) {
vnic->hash_type = VNIC_RSS_CFG_REQ_HASH_TYPE_IPV4 | req.hash_type = cpu_to_le32(bp->rss_hash_cfg);
VNIC_RSS_CFG_REQ_HASH_TYPE_TCP_IPV4 |
VNIC_RSS_CFG_REQ_HASH_TYPE_IPV6 |
VNIC_RSS_CFG_REQ_HASH_TYPE_TCP_IPV6;
req.hash_type = cpu_to_le32(vnic->hash_type);
if (vnic->flags & BNXT_VNIC_RSS_FLAG) { if (vnic->flags & BNXT_VNIC_RSS_FLAG) {
if (BNXT_CHIP_TYPE_NITRO_A0(bp)) if (BNXT_CHIP_TYPE_NITRO_A0(bp))
max_rings = bp->rx_nr_rings - 1; max_rings = bp->rx_nr_rings - 1;
...@@ -6940,6 +6934,19 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -6940,6 +6934,19 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
#endif #endif
bnxt_set_dflt_rings(bp); bnxt_set_dflt_rings(bp);
/* Default RSS hash cfg. */
bp->rss_hash_cfg = VNIC_RSS_CFG_REQ_HASH_TYPE_IPV4 |
VNIC_RSS_CFG_REQ_HASH_TYPE_TCP_IPV4 |
VNIC_RSS_CFG_REQ_HASH_TYPE_IPV6 |
VNIC_RSS_CFG_REQ_HASH_TYPE_TCP_IPV6;
if (!BNXT_CHIP_NUM_57X0X(bp->chip_num) &&
!BNXT_CHIP_TYPE_NITRO_A0(bp) &&
bp->hwrm_spec_code >= 0x10501) {
bp->flags |= BNXT_FLAG_UDP_RSS_CAP;
bp->rss_hash_cfg |= VNIC_RSS_CFG_REQ_HASH_TYPE_UDP_IPV4 |
VNIC_RSS_CFG_REQ_HASH_TYPE_UDP_IPV6;
}
if (BNXT_PF(bp) && !BNXT_CHIP_TYPE_NITRO_A0(bp)) { if (BNXT_PF(bp) && !BNXT_CHIP_TYPE_NITRO_A0(bp)) {
dev->hw_features |= NETIF_F_NTUPLE; dev->hw_features |= NETIF_F_NTUPLE;
if (bnxt_rfs_capable(bp)) { if (bnxt_rfs_capable(bp)) {
......
...@@ -700,7 +700,6 @@ struct bnxt_vnic_info { ...@@ -700,7 +700,6 @@ struct bnxt_vnic_info {
u8 *uc_list; u8 *uc_list;
u16 *fw_grp_ids; u16 *fw_grp_ids;
u16 hash_type;
dma_addr_t rss_table_dma_addr; dma_addr_t rss_table_dma_addr;
__le16 *rss_table; __le16 *rss_table;
dma_addr_t rss_hash_key_dma_addr; dma_addr_t rss_hash_key_dma_addr;
...@@ -952,6 +951,7 @@ struct bnxt { ...@@ -952,6 +951,7 @@ struct bnxt {
#define BNXT_FLAG_RFS 0x100 #define BNXT_FLAG_RFS 0x100
#define BNXT_FLAG_SHARED_RINGS 0x200 #define BNXT_FLAG_SHARED_RINGS 0x200
#define BNXT_FLAG_PORT_STATS 0x400 #define BNXT_FLAG_PORT_STATS 0x400
#define BNXT_FLAG_UDP_RSS_CAP 0x800
#define BNXT_FLAG_EEE_CAP 0x1000 #define BNXT_FLAG_EEE_CAP 0x1000
#define BNXT_FLAG_CHIP_NITRO_A0 0x1000000 #define BNXT_FLAG_CHIP_NITRO_A0 0x1000000
...@@ -1007,6 +1007,7 @@ struct bnxt { ...@@ -1007,6 +1007,7 @@ struct bnxt {
struct bnxt_ring_grp_info *grp_info; struct bnxt_ring_grp_info *grp_info;
struct bnxt_vnic_info *vnic_info; struct bnxt_vnic_info *vnic_info;
int nr_vnics; int nr_vnics;
u32 rss_hash_cfg;
u8 max_tc; u8 max_tc;
struct bnxt_queue_info q_info[BNXT_MAX_QUEUE]; struct bnxt_queue_info q_info[BNXT_MAX_QUEUE];
......
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