Blame SOURCES/0044-netdrv-bnxt_en-Handle-standalone-RX_AGG-completions.patch

f95c89
From 7d47d61e11444426ad0d5493de4194224d693606 Mon Sep 17 00:00:00 2001
f95c89
From: Jonathan Toppins <jtoppins@redhat.com>
f95c89
Date: Wed, 2 Oct 2019 18:22:59 -0400
f95c89
Subject: [PATCH 44/96] [netdrv] bnxt_en: Handle standalone RX_AGG completions
f95c89
f95c89
Message-id: <a156f3cbca063eab1a76e155863749b563b042af.1570027456.git.jtoppins@redhat.com>
f95c89
Patchwork-id: 276463
f95c89
O-Subject: [RHEL-8.2 PATCH 37/78] bnxt_en: Handle standalone RX_AGG completions.
f95c89
Bugzilla: 1724766
f95c89
RH-Acked-by: John Linville <linville@redhat.com>
f95c89
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
f95c89
f95c89
On the new 57500 chips, these new RX_AGG completions are not coalesced
f95c89
at the TPA_END completion.  Handle these by storing them in the
f95c89
array in the bnxt_tpa_info struct, as they are seen when processing
f95c89
the CMPL ring.
f95c89
f95c89
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
f95c89
Signed-off-by: David S. Miller <davem@davemloft.net>
f95c89
(cherry picked from commit 8fe88ce7ab3181a11989eb7a8bb00c42a2b7b3b0)
f95c89
Bugzilla: 1724766
f95c89
Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=23809532
f95c89
Tested: build, boot, basic ping
f95c89
Signed-off-by: Jonathan Toppins <jtoppins@redhat.com>
f95c89
Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
f95c89
---
f95c89
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 20 ++++++++++++++++++--
f95c89
 1 file changed, 18 insertions(+), 2 deletions(-)
f95c89
f95c89
Index: src/drivers/net/ethernet/broadcom/bnxt/bnxt.c
f95c89
===================================================================
f95c89
--- src.orig/drivers/net/ethernet/broadcom/bnxt/bnxt.c	2020-02-06 16:23:16.115509434 +0100
f95c89
+++ src/drivers/net/ethernet/broadcom/bnxt/bnxt.c	2020-02-06 16:23:16.250508195 +0100
f95c89
@@ -1519,6 +1519,17 @@
f95c89
 	return skb;
f95c89
 }
f95c89
 
f95c89
+static void bnxt_tpa_agg(struct bnxt *bp, struct bnxt_rx_ring_info *rxr,
f95c89
+			 struct rx_agg_cmp *rx_agg)
f95c89
+{
f95c89
+	u16 agg_id = TPA_AGG_AGG_ID(rx_agg);
f95c89
+	struct bnxt_tpa_info *tpa_info;
f95c89
+
f95c89
+	tpa_info = &rxr->rx_tpa[agg_id];
f95c89
+	BUG_ON(tpa_info->agg_count >= MAX_SKB_FRAGS);
f95c89
+	tpa_info->agg_arr[tpa_info->agg_count++] = *rx_agg;
f95c89
+}
f95c89
+
f95c89
 static void bnxt_deliver_skb(struct bnxt *bp, struct bnxt_napi *bnapi,
f95c89
 			     struct sk_buff *skb)
f95c89
 {
f95c89
@@ -1560,6 +1571,13 @@
f95c89
 	rxcmp = (struct rx_cmp *)
f95c89
 			&cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)];
f95c89
 
f95c89
+	cmp_type = RX_CMP_TYPE(rxcmp);
f95c89
+
f95c89
+	if (cmp_type == CMP_TYPE_RX_TPA_AGG_CMP) {
f95c89
+		bnxt_tpa_agg(bp, rxr, (struct rx_agg_cmp *)rxcmp);
f95c89
+		goto next_rx_no_prod_no_len;
f95c89
+	}
f95c89
+
f95c89
 	tmp_raw_cons = NEXT_RAW_CMP(tmp_raw_cons);
f95c89
 	cp_cons = RING_CMP(tmp_raw_cons);
f95c89
 	rxcmp1 = (struct rx_cmp_ext *)
f95c89
@@ -1568,8 +1586,6 @@
f95c89
 	if (!RX_CMP_VALID(rxcmp1, tmp_raw_cons))
f95c89
 		return -EBUSY;
f95c89
 
f95c89
-	cmp_type = RX_CMP_TYPE(rxcmp);
f95c89
-
f95c89
 	prod = rxr->rx_prod;
f95c89
 
f95c89
 	if (cmp_type == CMP_TYPE_RX_L2_TPA_START_CMP) {