patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Cc: Ajit Khaparde <ajit.khaparde@broadcom.com>,
	Somnath Kotur <somnath.kotur@broadcom.com>,
	dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/bnxt: fix ping with MTU change' has been queued to LTS release 18.11.6
Date: Tue, 10 Dec 2019 14:59:08 +0000	[thread overview]
Message-ID: <20191210145937.32755-34-ktraynor@redhat.com> (raw)
In-Reply-To: <20191210145937.32755-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/16/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/5326842b58bd8570c3b8303216da70f82a661895

Thanks.

Kevin.

---
From 5326842b58bd8570c3b8303216da70f82a661895 Mon Sep 17 00:00:00 2001
From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Date: Thu, 24 Oct 2019 13:14:17 +0530
Subject: [PATCH] net/bnxt: fix ping with MTU change

[ upstream commit 7d4e9e2606752678aacc96e017ebc3c44a260ff1 ]

Driver was setting maximum receive unit differently in bnxt_mtu_set_op
and bnxt_hwrm_vnic_alloc. Moreover firmware adds the 4 bytes for FCS.
Fixed it by setting correct maximum receive unit value.

Fixes: daef48efe5e5 ("net/bnxt: support set MTU")

Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  3 +++
 drivers/net/bnxt/bnxt_ethdev.c |  3 +--
 drivers/net/bnxt/bnxt_hwrm.c   | 11 +++--------
 3 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 0ef5afcba..eeced3a47 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -23,4 +23,7 @@
 #define BNXT_MAX_MTU		9574
 #define VLAN_TAG_SIZE		4
+/* FW adds extra 4 bytes for FCS */
+#define BNXT_VNIC_MRU(mtu)\
+	((mtu) + ETHER_HDR_LEN + VLAN_TAG_SIZE * BNXT_NUM_VLANS)
 #define BNXT_VF_RSV_NUM_RSS_CTX	1
 #define BNXT_VF_RSV_NUM_L2_CTX	4
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 9da3a46c6..925ea42e6 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1692,6 +1692,5 @@ static int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
 		uint16_t size = 0;
 
-		vnic->mru = bp->eth_dev->data->mtu + ETHER_HDR_LEN +
-					ETHER_CRC_LEN + VLAN_TAG_SIZE * 2;
+		vnic->mru = BNXT_VNIC_MRU(new_mtu);
 		rc = bnxt_hwrm_vnic_cfg(bp, vnic);
 		if (rc)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 74f046c29..596ab3658 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1333,6 +1333,5 @@ int bnxt_hwrm_vnic_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 	vnic->cos_rule = (uint16_t)HWRM_NA_SIGNATURE;
 	vnic->lb_rule = (uint16_t)HWRM_NA_SIGNATURE;
-	vnic->mru = bp->eth_dev->data->mtu + ETHER_HDR_LEN +
-				ETHER_CRC_LEN + VLAN_TAG_SIZE;
+	vnic->mru = BNXT_VNIC_MRU(bp->eth_dev->data->mtu);
 	HWRM_PREP(req, VNIC_ALLOC, BNXT_USE_CHIMP_MB);
 
@@ -2528,7 +2527,5 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp, int tx_rings)
 	req.flags = rte_cpu_to_le_32(bp->pf.func_cfg_flags);
 	req.mtu = rte_cpu_to_le_16(BNXT_MAX_MTU);
-	req.mru = rte_cpu_to_le_16(bp->eth_dev->data->mtu + ETHER_HDR_LEN +
-				   ETHER_CRC_LEN + VLAN_TAG_SIZE *
-				   BNXT_NUM_VLANS);
+	req.mru = rte_cpu_to_le_16(BNXT_VNIC_MRU(bp->eth_dev->data->mtu));
 	req.num_rsscos_ctxs = rte_cpu_to_le_16(bp->max_rsscos_ctx);
 	req.num_stat_ctxs = rte_cpu_to_le_16(bp->max_stat_ctx);
@@ -2569,7 +2566,5 @@ static void populate_vf_func_cfg_req(struct bnxt *bp,
 				    ETHER_CRC_LEN + VLAN_TAG_SIZE *
 				    BNXT_NUM_VLANS);
-	req->mru = rte_cpu_to_le_16(bp->eth_dev->data->mtu + ETHER_HDR_LEN +
-				    ETHER_CRC_LEN + VLAN_TAG_SIZE *
-				    BNXT_NUM_VLANS);
+	req->mru = rte_cpu_to_le_16(BNXT_VNIC_MRU(bp->eth_dev->data->mtu));
 	req->num_rsscos_ctxs = rte_cpu_to_le_16(bp->max_rsscos_ctx /
 						(num_vfs + 1));
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-10 14:49:41.399037258 +0000
+++ 0034-net-bnxt-fix-ping-with-MTU-change.patch	2019-12-10 14:49:39.057457674 +0000
@@ -1 +1 @@
-From 7d4e9e2606752678aacc96e017ebc3c44a260ff1 Mon Sep 17 00:00:00 2001
+From 5326842b58bd8570c3b8303216da70f82a661895 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7d4e9e2606752678aacc96e017ebc3c44a260ff1 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index e5bdf6360..975bcf9c6 100644
+index 0ef5afcba..eeced3a47 100644
@@ -26,3 +27,3 @@
-@@ -78,4 +78,7 @@
- 				 RTE_ETHER_CRC_LEN +\
- 				 (BNXT_NUM_VLANS * VLAN_TAG_SIZE))
+@@ -23,4 +23,7 @@
+ #define BNXT_MAX_MTU		9574
+ #define VLAN_TAG_SIZE		4
@@ -31 +32 @@
-+	((mtu) + RTE_ETHER_HDR_LEN + VLAN_TAG_SIZE * BNXT_NUM_VLANS)
++	((mtu) + ETHER_HDR_LEN + VLAN_TAG_SIZE * BNXT_NUM_VLANS)
@@ -35 +36 @@
-index e7ec99e15..c97fcaceb 100644
+index 9da3a46c6..925ea42e6 100644
@@ -38 +39 @@
-@@ -2175,6 +2175,5 @@ static int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
+@@ -1692,6 +1692,5 @@ static int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
@@ -41,2 +42,2 @@
--		vnic->mru = new_mtu + RTE_ETHER_HDR_LEN +
--				RTE_ETHER_CRC_LEN + VLAN_TAG_SIZE * 2;
+-		vnic->mru = bp->eth_dev->data->mtu + ETHER_HDR_LEN +
+-					ETHER_CRC_LEN + VLAN_TAG_SIZE * 2;
@@ -47 +48 @@
-index 18e7429a7..018113c4c 100644
+index 74f046c29..596ab3658 100644
@@ -50,5 +51,5 @@
-@@ -1593,6 +1593,5 @@ int bnxt_hwrm_vnic_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic)
- 
- skip_ring_grps:
--	vnic->mru = bp->eth_dev->data->mtu + RTE_ETHER_HDR_LEN +
--				RTE_ETHER_CRC_LEN + VLAN_TAG_SIZE;
+@@ -1333,6 +1333,5 @@ int bnxt_hwrm_vnic_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+ 	vnic->cos_rule = (uint16_t)HWRM_NA_SIGNATURE;
+ 	vnic->lb_rule = (uint16_t)HWRM_NA_SIGNATURE;
+-	vnic->mru = bp->eth_dev->data->mtu + ETHER_HDR_LEN +
+-				ETHER_CRC_LEN + VLAN_TAG_SIZE;
@@ -58 +59 @@
-@@ -2955,7 +2954,5 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp, int tx_rings)
+@@ -2528,7 +2527,5 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp, int tx_rings)
@@ -61,2 +62,2 @@
--	req.mru = rte_cpu_to_le_16(bp->eth_dev->data->mtu + RTE_ETHER_HDR_LEN +
--				   RTE_ETHER_CRC_LEN + VLAN_TAG_SIZE *
+-	req.mru = rte_cpu_to_le_16(bp->eth_dev->data->mtu + ETHER_HDR_LEN +
+-				   ETHER_CRC_LEN + VLAN_TAG_SIZE *
@@ -67,2 +68,2 @@
-@@ -2996,7 +2993,5 @@ static void populate_vf_func_cfg_req(struct bnxt *bp,
- 				    RTE_ETHER_CRC_LEN + VLAN_TAG_SIZE *
+@@ -2569,7 +2566,5 @@ static void populate_vf_func_cfg_req(struct bnxt *bp,
+ 				    ETHER_CRC_LEN + VLAN_TAG_SIZE *
@@ -70,2 +71,2 @@
--	req->mru = rte_cpu_to_le_16(bp->eth_dev->data->mtu + RTE_ETHER_HDR_LEN +
--				    RTE_ETHER_CRC_LEN + VLAN_TAG_SIZE *
+-	req->mru = rte_cpu_to_le_16(bp->eth_dev->data->mtu + ETHER_HDR_LEN +
+-				    ETHER_CRC_LEN + VLAN_TAG_SIZE *


  parent reply	other threads:[~2019-12-10 15:01 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10 14:58 [dpdk-stable] patch 'app/testpmd: fix CRC strip command' " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'net/i40e: fix integer overflow' " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'vhost: translate incoming log address to GPA' " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'vhost: fix virtqueue not accessible' " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'vhost: prevent zero copy mode if IOMMU is on' " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'net/i40e: fix address of first segment' " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'net/ixgbe: " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'doc: fix a common typo in NIC guides' " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'app/testpmd: fix help for loop topology option' " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'net/mlx4: remove dependency on libmnl in meson' " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'net/axgbe: fix double unlock' " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'net/af_packet: improve Tx statistics accuracy' " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'net/enetc: fix BD ring alignment' " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'bus/fslmc: fix global variable multiple definitions' " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'net/igb: " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'crypto/null: " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'crypto/virtio: " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'compress/octeontx: " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'test: " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'reciprocal: fix off-by-one with 32-bit divisor' " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'vfio: fix truncated BAR offset for 32-bit' " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'ethdev: fix include of ethernet header file' " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'net/bnxt: fix mbuf free when clearing Tx queue' " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'net/i40e: fix exception with multi-driver' " Kevin Traynor
2019-12-10 14:58 ` [dpdk-stable] patch 'net/ixgbe: fix zeroing of RSS config' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'net/e1000: " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'net/virtio: reject deferred Rx start' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'net/virtio: reject deferred Tx " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'net/virtio: reject unsupported Rx multi-queue modes' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'net/virtio: reject unsupported Tx " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'vhost: fix IPv4 checksum' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'net/mlx: fix debug build with icc' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'app/testpmd: fix Tx checksum when TSO enabled' " Kevin Traynor
2019-12-10 14:59 ` Kevin Traynor [this message]
2019-12-10 14:59 ` [dpdk-stable] patch 'net/bnxt: fix setting max RSS contexts' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'net/bnxt: fix writing MTU to FW' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'net/bnxt: expose some missing counters in port stats' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'net/bonding: use non deprecated PCI API' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'vhost: fix build on RHEL 7.6 for Power' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'app/procinfo: use strlcpy for copying string' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'examples/vm_power: fix type of cmdline token in cli' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'examples/l3fwd-power: fix Rx interrupt disabling' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'power: fix socket indicator value' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'examples/vm_power: fix build without i40e' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'usertools: fix pmdinfo with python 3 and pyelftools>=0.24' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'usertools: fix telemetry client with python 3' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'doc: fix description of links to EAL options pages' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'common/dpaax: fallback to check separate memory node for VM' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'doc: fix description of versioning macros' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'eventdev: fix possible use of uninitialized var' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'common/cpt: fix possible null dereference' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'compress/octeontx: remove commented out code' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'event/opdl: " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'net/bnxt: " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'mk: fix build on arm64' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix length retrieved from hardware' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix GCM IV length' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix SHA256-HMAC digest " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'crypto/openssl: use local copy for session contexts' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'net/fm10k: fix mbuf free in vector Rx' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'net/igb: fix PHY status if PHY reset is not blocked' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'net/bonding: fix port ID check' " Kevin Traynor
2019-12-10 14:59 ` [dpdk-stable] patch 'port: fix pcap support with meson' " Kevin Traynor

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=20191210145937.32755-34-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=santosh.rastapur@broadcom.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=stable@dpdk.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;
as well as URLs for NNTP newsgroup(s).