[dpdk-stable] patch 'net/octeontx2: fix MTU when PTP is enabled' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:29:01 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c7afc9980446a742d86fbf758d635f7c4b96a03b

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From c7afc9980446a742d86fbf758d635f7c4b96a03b Mon Sep 17 00:00:00 2001
From: Hanumanth Reddy Pothula <hpothula at marvell.com>
Date: Tue, 10 Aug 2021 12:51:00 +0530
Subject: [PATCH] net/octeontx2: fix MTU when PTP is enabled
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 07d15d4d84e89a2f7a56bec24225c8ff326a9cf8 ]

Update MTU value based on PTP enable status and reserve eight
bytes in TX path to accommodate VLAN tags.

If PTP is enabled maximum allowed MTU is 9200 otherwise it's 9208.

Fixes: b5dc3140448e ("net/octeontx2: support base PTP")

Signed-off-by: Hanumanth Reddy Pothula <hpothula at marvell.com>
Acked-by: Jerin Jacob <jerinj at marvell.com>
---
 drivers/net/octeontx2/otx2_ethdev_ops.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/octeontx2/otx2_ethdev_ops.c b/drivers/net/octeontx2/otx2_ethdev_ops.c
index f586e9ef59..99ddcb0170 100644
--- a/drivers/net/octeontx2/otx2_ethdev_ops.c
+++ b/drivers/net/octeontx2/otx2_ethdev_ops.c
@@ -17,7 +17,8 @@ otx2_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
 	struct nix_frs_cfg *req;
 	int rc;
 
-	frame_size += NIX_TIMESYNC_RX_OFFSET * otx2_ethdev_is_ptp_en(dev);
+	if (dev->configured && otx2_ethdev_is_ptp_en(dev))
+		frame_size += NIX_TIMESYNC_RX_OFFSET;
 
 	/* Check if MTU is within the allowed range */
 	if (frame_size < NIX_MIN_FRS || frame_size > NIX_MAX_FRS)
@@ -560,6 +561,11 @@ otx2_nix_info_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *devinfo)
 	devinfo->max_vfs = pci_dev->max_vfs;
 	devinfo->max_mtu = devinfo->max_rx_pktlen - NIX_L2_OVERHEAD;
 	devinfo->min_mtu = devinfo->min_rx_bufsize - NIX_L2_OVERHEAD;
+	if (dev->configured && otx2_ethdev_is_ptp_en(dev)) {
+		devinfo->max_mtu -=  NIX_TIMESYNC_RX_OFFSET;
+		devinfo->min_mtu -=  NIX_TIMESYNC_RX_OFFSET;
+		devinfo->max_rx_pktlen -= NIX_TIMESYNC_RX_OFFSET;
+	}
 
 	devinfo->rx_offload_capa = dev->rx_offload_capa;
 	devinfo->tx_offload_capa = dev->tx_offload_capa;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.630227413 +0800
+++ 0057-net-octeontx2-fix-MTU-when-PTP-is-enabled.patch	2021-11-10 14:17:01.807413276 +0800
@@ -1 +1 @@
-From 07d15d4d84e89a2f7a56bec24225c8ff326a9cf8 Mon Sep 17 00:00:00 2001
+From c7afc9980446a742d86fbf758d635f7c4b96a03b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 07d15d4d84e89a2f7a56bec24225c8ff326a9cf8 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index 5a4501208e..552e6bd43d 100644
+index f586e9ef59..99ddcb0170 100644
@@ -34 +36 @@
-@@ -547,6 +548,11 @@ otx2_nix_info_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *devinfo)
+@@ -560,6 +561,11 @@ otx2_nix_info_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *devinfo)


More information about the stable mailing list