Netdev List
 help / color / mirror / Atom feed
From: Michael Chan <michael.chan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH net-next 06/13] bnxt_en: Update RSS setup and GRO-HW logic according to the latest spec.
Date: Sun,  5 Aug 2018 16:51:51 -0400	[thread overview]
Message-ID: <1533502318-22359-7-git-send-email-michael.chan@broadcom.com> (raw)
In-Reply-To: <1533502318-22359-1-git-send-email-michael.chan@broadcom.com>

Set the default hash mode flag in HWRM_VNIC_RSS_CFG to signal to the
firmware that the driver is compliant with the latest spec.  With
that, the firmware can return expanded RSS profile IDs that the driver
checks to setup the proper gso_type for GRO-HW packets.  But instead
of checking for the new profile IDs, we check the IP_TYPE flag
in TPA_START which is more straight forward than checking a list of
profile IDs.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++-
 drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index e0e3b4b..1714850 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -1115,7 +1115,7 @@ static void bnxt_tpa_start(struct bnxt *bp, struct bnxt_rx_ring_info *rxr,
 		tpa_info->hash_type = PKT_HASH_TYPE_L4;
 		tpa_info->gso_type = SKB_GSO_TCPV4;
 		/* RSS profiles 1 and 3 with extract code 0 for inner 4-tuple */
-		if (hash_type == 3)
+		if (hash_type == 3 || TPA_START_IS_IPV6(tpa_start1))
 			tpa_info->gso_type = SKB_GSO_TCPV6;
 		tpa_info->rss_hash =
 			le32_to_cpu(tpa_start->rx_tpa_start_cmp_rss_hash);
@@ -3981,6 +3981,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);
 	if (set_rss) {
 		req.hash_type = cpu_to_le32(bp->rss_hash_cfg);
+		req.hash_mode_flags = VNIC_RSS_CFG_REQ_HASH_MODE_FLAGS_DEFAULT;
 		if (vnic->flags & BNXT_VNIC_RSS_FLAG) {
 			if (BNXT_CHIP_TYPE_NITRO_A0(bp))
 				max_rings = bp->rx_nr_rings - 1;
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
index b44a758..7ea022d 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
@@ -326,6 +326,10 @@ struct rx_tpa_start_cmp_ext {
 	((le32_to_cpu((rx_tpa_start)->rx_tpa_start_cmp_cfa_code_v2) &	\
 	 RX_TPA_START_CMP_CFA_CODE) >> RX_TPA_START_CMPL_CFA_CODE_SHIFT)
 
+#define TPA_START_IS_IPV6(rx_tpa_start)				\
+	(!!((rx_tpa_start)->rx_tpa_start_cmp_flags2 &		\
+	    cpu_to_le32(RX_TPA_START_CMP_FLAGS2_IP_TYPE)))
+
 struct rx_tpa_end_cmp {
 	__le32 rx_tpa_end_cmp_len_flags_type;
 	#define RX_TPA_END_CMP_TYPE				(0x3f << 0)
-- 
2.5.1

  parent reply	other threads:[~2018-08-05 22:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-05 20:51 [PATCH net-next 00/13] bnxt_en: Updates for net-next Michael Chan
2018-08-05 20:51 ` [PATCH net-next 01/13] bnxt_en: Update firmware interface version to 1.9.2.25 Michael Chan
2018-08-05 20:51 ` [PATCH net-next 02/13] bnxt_en: Adjust timer based on ethtool stats-block-usecs settings Michael Chan
2018-08-05 20:51 ` [PATCH net-next 03/13] bnxt_en: Add external loopback test to ethtool selftest Michael Chan
2018-08-05 20:51 ` [PATCH net-next 04/13] bnxt_en: Add PHY retry logic Michael Chan
2018-08-05 20:51 ` [PATCH net-next 05/13] bnxt_en: Add new VF resource allocation strategy mode Michael Chan
2018-08-05 20:51 ` Michael Chan [this message]
2018-08-05 20:51 ` [PATCH net-next 07/13] bnxt_en: Add support for ethtool get dump Michael Chan
2018-08-05 20:51 ` [PATCH net-next 08/13] bnxt_en: Add BNXT_NEW_RM() macro Michael Chan
2018-08-05 20:51 ` [PATCH net-next 09/13] bnxt_en: Move firmware related flags to a new fw_cap field in struct bnxt Michael Chan
2018-08-05 20:51 ` [PATCH net-next 10/13] bnxt_en: Notify firmware about IF state changes Michael Chan
2018-08-05 20:51 ` [PATCH net-next 11/13] bnxt_en: Add hwmon sysfs support to read temperature Michael Chan
2018-08-05 20:51 ` [PATCH net-next 12/13] bnxt_en: Add DCBNL DSCP application protocol support Michael Chan
2018-08-05 20:51 ` [PATCH net-next 13/13] bnxt_en: Do not use the CNP CoS queue for networking traffic Michael Chan
2018-08-06  0:37 ` [PATCH net-next 00/13] bnxt_en: Updates for net-next David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1533502318-22359-7-git-send-email-michael.chan@broadcom.com \
    --to=michael.chan@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox