patch 'net/octeontx2: fix MTU when PTP is enabled' has been queued to stable release 19.11.11

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Nov 30 17:33:55 CET 2021


Hi,

FYI, your patch has been queued to stable release 19.11.11

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before December 10th 2021. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/0b0a33dc3a32f5dbfe52cafe15e1907969910dbe

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 0b0a33dc3a32f5dbfe52cafe15e1907969910dbe 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

[ 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 1f8292589c..0854026706 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.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-30 16:50:07.896825828 +0100
+++ 0031-net-octeontx2-fix-MTU-when-PTP-is-enabled.patch	2021-11-30 16:50:05.614872238 +0100
@@ -1 +1 @@
-From 07d15d4d84e89a2f7a56bec24225c8ff326a9cf8 Mon Sep 17 00:00:00 2001
+From 0b0a33dc3a32f5dbfe52cafe15e1907969910dbe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 07d15d4d84e89a2f7a56bec24225c8ff326a9cf8 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 5a4501208e..552e6bd43d 100644
+index 1f8292589c..0854026706 100644
@@ -34 +35 @@
-@@ -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