You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
3.0 KiB
77 lines
3.0 KiB
5 years ago
|
From 57b905197ca2cf5b07e4a9da7f257b229f99c6a1 Mon Sep 17 00:00:00 2001
|
||
|
From: Jonathan Toppins <jtoppins@redhat.com>
|
||
|
Date: Wed, 2 Oct 2019 18:22:41 -0400
|
||
|
Subject: [PATCH 26/96] [netdrv] bnxt_en: Add support for aRFS on 57500 chips
|
||
|
|
||
|
Message-id: <c48b69b512cfac54a82beb4bc5641307b723d623.1570027456.git.jtoppins@redhat.com>
|
||
|
Patchwork-id: 276445
|
||
|
O-Subject: [RHEL-8.2 PATCH 19/78] bnxt_en: Add support for aRFS on 57500 chips.
|
||
|
Bugzilla: 1724766
|
||
|
RH-Acked-by: John Linville <linville@redhat.com>
|
||
|
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
|
||
|
|
||
|
Set RSS ring table index of the RFS destination ring for the NTUPLE
|
||
|
filters on 57500 chips.
|
||
|
|
||
|
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
|
||
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||
|
(cherry picked from commit ac33906c67e22edeabe3f0150ffeb367462e754f)
|
||
|
Bugzilla: 1724766
|
||
|
Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=23809532
|
||
|
Tested: build, boot, basic ping
|
||
|
Signed-off-by: Jonathan Toppins <jtoppins@redhat.com>
|
||
|
Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
|
||
|
---
|
||
|
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 16 ++++++++++++----
|
||
|
1 file changed, 12 insertions(+), 4 deletions(-)
|
||
|
|
||
|
Index: src/drivers/net/ethernet/broadcom/bnxt/bnxt.c
|
||
|
===================================================================
|
||
|
--- src.orig/drivers/net/ethernet/broadcom/bnxt/bnxt.c 2020-02-06 16:23:13.662531951 +0100
|
||
|
+++ src/drivers/net/ethernet/broadcom/bnxt/bnxt.c 2020-02-06 16:23:13.805530638 +0100
|
||
|
@@ -4232,16 +4232,25 @@
|
||
|
static int bnxt_hwrm_cfa_ntuple_filter_alloc(struct bnxt *bp,
|
||
|
struct bnxt_ntuple_filter *fltr)
|
||
|
{
|
||
|
- struct bnxt_vnic_info *vnic = &bp->vnic_info[fltr->rxq + 1];
|
||
|
struct hwrm_cfa_ntuple_filter_alloc_input req = {0};
|
||
|
struct hwrm_cfa_ntuple_filter_alloc_output *resp;
|
||
|
struct flow_keys *keys = &fltr->fkeys;
|
||
|
+ struct bnxt_vnic_info *vnic;
|
||
|
+ u32 dst_ena = 0;
|
||
|
int rc = 0;
|
||
|
|
||
|
bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_CFA_NTUPLE_FILTER_ALLOC, -1, -1);
|
||
|
req.l2_filter_id = bp->vnic_info[0].fw_l2_filter_id[fltr->l2_fltr_idx];
|
||
|
|
||
|
- req.enables = cpu_to_le32(BNXT_NTP_FLTR_FLAGS);
|
||
|
+ if (bp->fw_cap & BNXT_FW_CAP_CFA_RFS_RING_TBL_IDX) {
|
||
|
+ dst_ena = CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_RFS_RING_TBL_IDX;
|
||
|
+ req.rfs_ring_tbl_idx = cpu_to_le16(fltr->rxq);
|
||
|
+ vnic = &bp->vnic_info[0];
|
||
|
+ } else {
|
||
|
+ vnic = &bp->vnic_info[fltr->rxq + 1];
|
||
|
+ }
|
||
|
+ req.dst_id = cpu_to_le16(vnic->fw_vnic_id);
|
||
|
+ req.enables = cpu_to_le32(BNXT_NTP_FLTR_FLAGS | dst_ena);
|
||
|
|
||
|
req.ethertype = htons(ETH_P_IP);
|
||
|
memcpy(req.src_macaddr, fltr->src_mac_addr, ETH_ALEN);
|
||
|
@@ -4279,7 +4288,6 @@
|
||
|
req.dst_port = keys->ports.dst;
|
||
|
req.dst_port_mask = cpu_to_be16(0xffff);
|
||
|
|
||
|
- req.dst_id = cpu_to_le16(vnic->fw_vnic_id);
|
||
|
mutex_lock(&bp->hwrm_cmd_lock);
|
||
|
rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
|
||
|
if (!rc) {
|
||
|
@@ -9126,7 +9134,7 @@
|
||
|
int vnics, max_vnics, max_rss_ctxs;
|
||
|
|
||
|
if (bp->flags & BNXT_FLAG_CHIP_P5)
|
||
|
- return false;
|
||
|
+ return bnxt_rfs_supported(bp);
|
||
|
if (!(bp->flags & BNXT_FLAG_MSIX_CAP) || !bnxt_can_reserve_rings(bp))
|
||
|
return false;
|
||
|
|