From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 476A941D52 for ; Thu, 23 Feb 2023 16:08:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD0E34328D; Thu, 23 Feb 2023 16:08:13 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id DABD643295 for ; Thu, 23 Feb 2023 16:08:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677164892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sx2qHDGJoHLZlrz3EScgT3DAtRicsPHdG4amgyrrZoc=; b=B7qOht38Guq14QKv42/MahMrA8hBgvVTU7Mnh+bFuVtPhexEWCb4Mx3aunXl2uP/R6H8AN dE0YC+ufmVL851snUDYDLwEu/9rI+Jjbjio0TtNQFVUzhQgPcIoVZsTyQI/pu6Jl+mpfLE 1TSQpAHIED+K0XFCVPxYXqUa7BmZZ2I= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-316-MFwcTqogNWu2v9H0K2JKaA-1; Thu, 23 Feb 2023 10:08:07 -0500 X-MC-Unique: MFwcTqogNWu2v9H0K2JKaA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A572218E0940; Thu, 23 Feb 2023 15:08:06 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9913E2166B2C; Thu, 23 Feb 2023 15:08:05 +0000 (UTC) From: Kevin Traynor To: Ivan Malov Cc: Andy Moreton , Viacheslav Galaktionov , Andrew Rybchenko , dpdk stable Subject: patch 'net/sfc: export pick transfer proxy callback to representors' has been queued to stable release 21.11.4 Date: Thu, 23 Feb 2023 15:05:56 +0000 Message-Id: <20230223150631.723699-65-ktraynor@redhat.com> In-Reply-To: <20230223150631.723699-1-ktraynor@redhat.com> References: <20230223150631.723699-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 21.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 02/28/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://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/a3172b1ab98a7db04be4878ddf9ce020ebf646bf Thanks. Kevin --- >From a3172b1ab98a7db04be4878ddf9ce020ebf646bf Mon Sep 17 00:00:00 2001 From: Ivan Malov Date: Tue, 31 Jan 2023 15:08:39 +0400 Subject: [PATCH] net/sfc: export pick transfer proxy callback to representors [ 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 Reviewed-by: Andy Moreton Reviewed-by: Viacheslav Galaktionov Reviewed-by: Andrew Rybchenko --- 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 9d88d554c1..0669780f86 100644 --- a/drivers/net/sfc/sfc_repr.c +++ b/drivers/net/sfc/sfc_repr.c @@ -10,4 +10,6 @@ #include +#include +#include #include #include @@ -883,4 +885,27 @@ sfc_repr_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) } +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, @@ -895,4 +920,5 @@ static const struct eth_dev_ops sfc_repr_dev_ops = { .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.39.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-23 14:46:25.378213589 +0000 +++ 0065-net-sfc-export-pick-transfer-proxy-callback-to-repre.patch 2023-02-23 14:46:23.815236123 +0000 @@ -1 +1 @@ -From d5a478f3b2ba3b2e6efebf36219eaff79b52bad1 Mon Sep 17 00:00:00 2001 +From a3172b1ab98a7db04be4878ddf9ce020ebf646bf Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d5a478f3b2ba3b2e6efebf36219eaff79b52bad1 ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index 417d0073cb..4b03b101d8 100644 +index 9d88d554c1..0669780f86 100644 @@ -38 +39 @@ -@@ -889,4 +891,27 @@ sfc_repr_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) +@@ -883,4 +885,27 @@ sfc_repr_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) @@ -66 +67 @@ -@@ -902,4 +927,5 @@ static const struct eth_dev_ops sfc_repr_dev_ops = { +@@ -895,4 +920,5 @@ static const struct eth_dev_ops sfc_repr_dev_ops = {