patch 'net/sfc: export pick transfer proxy callback to representors' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Mon Feb 27 08:00:14 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/01/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=e4f7453ec1c7efacf4ae92fdae243ed9a3410840

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From e4f7453ec1c7efacf4ae92fdae243ed9a3410840 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov at arknetworks.am>
Date: Tue, 31 Jan 2023 15:08:39 +0400
Subject: [PATCH] net/sfc: export pick transfer proxy callback to representors
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit d5a478f3b2ba3b2e6efebf36219eaff79b52bad1 ]

Currently, the "pick transfer proxy ethdev" callback is only
advertised for non-representor (in example, main PF) ethdevs.
That does not sit well with the original idea of this method,
which is to let applications discover the privileged port to
use for transfer flow management instead of any given ethdev.
Applications trying to leverage this API on sfc representors
receive an error and cannot configure transfer flow offloads.

Fix the problem by exporting the method to representor ports.

Fixes: 26706314d418 ("net/sfc: implement transfer proxy port callback")

Signed-off-by: Ivan Malov <ivan.malov at arknetworks.am>
Reviewed-by: Andy Moreton <amoreton at xilinx.com>
Reviewed-by: Viacheslav Galaktionov <viacheslav.galaktionov at arknetworks.am>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
---
 drivers/net/sfc/sfc_repr.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/drivers/net/sfc/sfc_repr.c b/drivers/net/sfc/sfc_repr.c
index 417d0073cb..4b03b101d8 100644
--- a/drivers/net/sfc/sfc_repr.c
+++ b/drivers/net/sfc/sfc_repr.c
@@ -9,6 +9,8 @@

 #include <stdint.h>

+#include <rte_flow_driver.h>
+#include <rte_flow.h>
 #include <rte_mbuf.h>
 #include <rte_ethdev.h>
 #include <rte_malloc.h>
@@ -888,6 +890,29 @@ sfc_repr_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	return 0;
 }

+static int
+sfc_repr_flow_pick_transfer_proxy(struct rte_eth_dev *dev,
+				  uint16_t *transfer_proxy_port,
+				  struct rte_flow_error *error)
+{
+	struct sfc_repr_shared *srs = sfc_repr_shared_by_eth_dev(dev);
+
+	return rte_flow_pick_transfer_proxy(srs->pf_port_id,
+					    transfer_proxy_port, error);
+}
+
+const struct rte_flow_ops sfc_repr_flow_ops = {
+	.pick_transfer_proxy = sfc_repr_flow_pick_transfer_proxy,
+};
+
+static int
+sfc_repr_dev_flow_ops_get(struct rte_eth_dev *dev __rte_unused,
+			  const struct rte_flow_ops **ops)
+{
+	*ops = &sfc_repr_flow_ops;
+	return 0;
+}
+
 static const struct eth_dev_ops sfc_repr_dev_ops = {
 	.dev_configure			= sfc_repr_dev_configure,
 	.dev_start			= sfc_repr_dev_start,
@@ -901,6 +926,7 @@ static const struct eth_dev_ops sfc_repr_dev_ops = {
 	.rx_queue_release		= sfc_repr_rx_queue_release,
 	.tx_queue_setup			= sfc_repr_tx_queue_setup,
 	.tx_queue_release		= sfc_repr_tx_queue_release,
+	.flow_ops_get			= sfc_repr_dev_flow_ops_get,
 };


--
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-27 14:08:44.307456100 +0800
+++ 0107-net-sfc-export-pick-transfer-proxy-callback-to-repre.patch	2023-02-27 14:08:40.849237000 +0800
@@ -1 +1 @@
-From d5a478f3b2ba3b2e6efebf36219eaff79b52bad1 Mon Sep 17 00:00:00 2001
+From e4f7453ec1c7efacf4ae92fdae243ed9a3410840 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit d5a478f3b2ba3b2e6efebf36219eaff79b52bad1 ]
@@ -17 +19,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list