[PATCH] net/sfc: export pick transfer proxy callback to representors

Andrew Rybchenko andrew.rybchenko at oktetlabs.ru
Tue Jan 31 08:52:20 CET 2023


On 1/31/23 10:24, Ivan Malov wrote:
> 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")
> Cc: stable at dpdk.org
> 
> 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>
> ---
>   drivers/net/sfc/sfc_flow.c |  4 ++++
>   drivers/net/sfc/sfc_flow.h |  2 ++
>   drivers/net/sfc/sfc_repr.c | 10 ++++++++++
>   3 files changed, 16 insertions(+)
> 
> diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
> index fb59abd0b5..2937953959 100644
> --- a/drivers/net/sfc/sfc_flow.c
> +++ b/drivers/net/sfc/sfc_flow.c
> @@ -2806,6 +2806,10 @@ const struct rte_flow_ops sfc_flow_ops = {
>   	.pick_transfer_proxy = sfc_flow_pick_transfer_proxy,
>   };
>   
> +const struct rte_flow_ops sfc_repr_flow_ops = {
> +	.pick_transfer_proxy = sfc_flow_pick_transfer_proxy,
> +};
> +

It would be nice to know it is tested in some way.
As far as I can see it can't work since
sfc_flow_pick_transfer_proxy() treats eth_dev->process_private
as struct sfc_adapter_priv, but it is sfc_repr in the case
of sfc representor ethdev. Am I missing something?



More information about the stable mailing list