From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: Ivan Malov <ivan.malov@oktetlabs.ru>, dev@dpdk.org
Cc: Thomas Monjalon <thomas@monjalon.net>, Ori Kam <orika@nvidia.com>,
Xiaoyun Li <xiaoyun.li@intel.com>,
Ferruh Yigit <ferruh.yigit@intel.com>,
Ray Kinsella <mdr@ashroe.eu>
Subject: Re: [dpdk-dev] [PATCH v2] ethdev: add API to query proxy port to manage transfer flows
Date: Wed, 6 Oct 2021 10:47:47 +0300 [thread overview]
Message-ID: <a3e516da-8550-a49a-e037-39e8cb38647b@oktetlabs.ru> (raw)
In-Reply-To: <20211005211045.29403-1-ivan.malov@oktetlabs.ru>
On 10/6/21 12:10 AM, Ivan Malov wrote:
> Not all DPDK ports in a given e-switch domain may have the
Search in the Internet does not provide e-switch as a shorter
form of "embedded switch". So, I agree with Thomas, it is
better to avoid it in the documentation. Especially taking
into account that there is a company with a similar name.
I.e. e-switch -> embedded switch
> privilege to manage "transfer" flows. Add an API to find a
> port with sufficient privileges by any port in the domain.
>
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
I have to review it better before, but it is better to do it
later than never.
> Acked-by: Ori Kam <orika@nvidia.com>
> ---
> Patch series [1] has reworked support for "transfer" flows.
> This allows to elaborate on the idea which first appeared
> in RFC [2]. Hence the patch in question.
>
> net/sfc driver is going to support the new API. The
> corresponding patch is already in progress and will
> be provided in the course of this release cycle.
>
> [1] https://patches.dpdk.org/project/dpdk/list/?series=19326
> [2] https://patches.dpdk.org/project/dpdk/list/?series=18737
[snip]
> diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst
> index 0787baed8c..5de30fad9c 100644
> --- a/doc/guides/rel_notes/release_21_11.rst
> +++ b/doc/guides/rel_notes/release_21_11.rst
> @@ -67,6 +67,9 @@ New Features
> Added macros ETH_RSS_IPV4_CHKSUM and ETH_RSS_L4_CHKSUM, now IPv4 and
> TCP/UDP/SCTP header checksum field can be used as input set for RSS.
>
> +* **Added an API to get a proxy port to manage "transfer" (e-switch) flows**
Let's avoid (e-switch) here. I guess initial definition of the
transfer intentionally avoid the term.
> + A new API, ``rte_flow_pick_transfer_proxy()``, was added.
> +
> * **Updated Broadcom bnxt PMD.**
>
> * Added flow offload support for Thor.
> diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
> index 647bbf91ce..15e978f7f7 100644
> --- a/lib/ethdev/rte_flow.c
> +++ b/lib/ethdev/rte_flow.c
> @@ -1270,3 +1270,25 @@ rte_flow_tunnel_item_release(uint16_t port_id,
> RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
> NULL, rte_strerror(ENOTSUP));
> }
> +
> +int
> +rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id,
> + struct rte_flow_error *error)
> +{
> + struct rte_eth_dev *dev = &rte_eth_devices[port_id];
Let's avoid initialization here since 'port_id' is not checked
yet to be correct. Let's assign dev below just before usage.
> + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);
> +
> + if (unlikely(ops == NULL))
> + return -rte_errno;
> +
> + if (likely(ops->pick_transfer_proxy != NULL)) {
Yes, I see that it is the stile in the file to expect
non-NULL callback, it is a bit unfair to say so when
just driver implements it. So, I suggest to remove it.
Also it is not an error or exception. It is documented
behaviour.
> + return flow_err(port_id,
> + ops->pick_transfer_proxy(dev, proxy_port_id,
> + error),
> + error);
> + }
> +
> + *proxy_port_id = port_id;
I think code will have less lines and easier to read if
we revert above if condition, do the assignment and
return 0 from its body.
> +
> + return 0;
> +}
> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
> index f195aa7224..5405e2565a 100644
> --- a/lib/ethdev/rte_flow.h
> +++ b/lib/ethdev/rte_flow.h
[snip]
> @@ -4427,6 +4430,34 @@ rte_flow_tunnel_item_release(uint16_t port_id,
> struct rte_flow_item *items,
> uint32_t num_of_items,
> struct rte_flow_error *error);
> +
> +/**
Don't we need experimental header here?
> + * Get a proxy port to manage "transfer" (e-switch) flows.
I suggest to have no (e-switch) here as well. "transfer" is
sufficient.
> + *
> + * Managing "transfer" flows requires that the user communicate them
> + * through a port which has the privilege to control the e-switch.
e-switch -> embedded switch
> + * For some vendors, all ports in a given e-switch domain have
e-switch -> embedded switch, or "switching domain"
> + * this privilege. For other vendors, it's only one port.
> + *
> + * This API indicates such a privileged port (a "proxy")
> + * for a given port in the same e-switch domain.
e-switch -> embedded switch, or "switching domain"
> + *
> + * @note
> + * If the PMD serving @p port_id doesn't have the corresponding method
> + * implemented, the API will return @p port_id via @p proxy_port_id.
> + *
> + * @param port_id
> + * Indicates the port to get a "proxy" for
> + * @param[out] proxy_port_id
> + * Indicates the "proxy" port
I should notice it earlier, but 'error' parameter description
is missing here.
> + *
> + * @return
> + * 0 on success, a negative error code otherwise
> + */
> +__rte_experimental
> +int
> +rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id,
> + struct rte_flow_error *error);
> #ifdef __cplusplus
> }
> #endif
next prev parent reply other threads:[~2021-10-06 7:47 UTC|newest]
Thread overview: 155+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-07 12:51 [dpdk-dev] [RFC PATCH] ethdev: clarify flow attribute and action port ID semantics Ivan Malov
2021-10-01 13:47 ` [dpdk-dev] [PATCH v1 00/12] ethdev: rework transfer flow API Andrew Rybchenko
2021-10-01 13:47 ` [dpdk-dev] [PATCH v1 01/12] ethdev: add ethdev item to " Andrew Rybchenko
2021-10-03 11:52 ` Ori Kam
2021-10-03 17:40 ` Ivan Malov
2021-10-03 21:09 ` Ori Kam
2021-10-04 0:00 ` Ivan Malov
2021-10-04 10:47 ` Andrew Rybchenko
2021-10-04 11:08 ` Ivan Malov
2021-10-01 13:47 ` [dpdk-dev] [PATCH v1 02/12] ethdev: add eswitch port " Andrew Rybchenko
2021-10-03 12:40 ` Ori Kam
2021-10-03 18:10 ` Ivan Malov
2021-10-04 5:45 ` Ori Kam
2021-10-04 11:05 ` Ivan Malov
2021-10-04 11:37 ` Ori Kam
2021-10-04 11:58 ` Ivan Malov
2021-10-05 6:20 ` Ori Kam
2021-10-05 9:19 ` Andrew Rybchenko
2021-10-05 12:12 ` Ivan Malov
2021-10-01 13:47 ` [dpdk-dev] [PATCH v1 03/12] ethdev: add ethdev action " Andrew Rybchenko
2021-10-01 13:47 ` [dpdk-dev] [PATCH v1 04/12] ethdev: add eswitch port " Andrew Rybchenko
2021-10-01 13:47 ` [dpdk-dev] [PATCH v1 05/12] ethdev: deprecate hard-to-use or ambiguous items and actions Andrew Rybchenko
2021-10-01 13:47 ` [dpdk-dev] [PATCH v1 06/12] ethdev: deprecate direction attributes in transfer flows Andrew Rybchenko
2021-10-01 13:47 ` [dpdk-dev] [PATCH v1 07/12] net/bnxt: support ethdev and E-Switch port flow items Andrew Rybchenko
2021-10-01 13:47 ` [dpdk-dev] [PATCH v1 08/12] net/bnxt: support ethdev and E-Switch port flow actions Andrew Rybchenko
2021-10-01 13:47 ` [dpdk-dev] [PATCH v1 09/12] net/enic: " Andrew Rybchenko
2021-10-01 13:47 ` [dpdk-dev] [PATCH v1 10/12] net/mlx5: support E-Switch port flow action Andrew Rybchenko
2021-10-01 13:47 ` [dpdk-dev] [PATCH v1 11/12] net/octeontx2: support ethdev " Andrew Rybchenko
2021-10-04 11:13 ` [dpdk-dev] [EXT] " Kiran Kumar Kokkilagadda
2021-10-04 12:45 ` Andrew Rybchenko
2021-10-01 13:47 ` [dpdk-dev] [PATCH v1 12/12] net/sfc: support ethdev flow item Andrew Rybchenko
2021-10-10 0:04 ` [dpdk-dev] [PATCH v2 00/12] ethdev: rework transfer flow API Ivan Malov
2021-10-10 0:04 ` [dpdk-dev] [PATCH v2 01/12] ethdev: add port representor item to " Ivan Malov
2021-10-10 11:15 ` Ori Kam
2021-10-10 13:30 ` Ivan Malov
2021-10-10 14:04 ` Ori Kam
2021-10-10 15:02 ` Ivan Malov
2021-10-10 0:04 ` [dpdk-dev] [PATCH v2 02/12] ethdev: add represented port " Ivan Malov
2021-10-10 0:04 ` [dpdk-dev] [PATCH v2 03/12] ethdev: add port representor action " Ivan Malov
2021-10-10 0:04 ` [dpdk-dev] [PATCH v2 04/12] ethdev: add represented port " Ivan Malov
2021-10-10 0:04 ` [dpdk-dev] [PATCH v2 05/12] ethdev: deprecate hard-to-use or ambiguous items and actions Ivan Malov
2021-10-10 0:04 ` [dpdk-dev] [PATCH v2 06/12] ethdev: deprecate direction attributes in transfer flows Ivan Malov
2021-10-10 0:04 ` [dpdk-dev] [PATCH v2 07/12] net/bnxt: support meta flow items to match on traffic source Ivan Malov
2021-10-10 0:04 ` [dpdk-dev] [PATCH v2 08/12] net/bnxt: support meta flow actions to overrule destinations Ivan Malov
2021-10-10 0:05 ` [dpdk-dev] [PATCH v2 09/12] net/enic: " Ivan Malov
2021-10-10 0:05 ` [dpdk-dev] [PATCH v2 10/12] net/mlx5: support represented port flow action Ivan Malov
2021-10-10 0:05 ` [dpdk-dev] [PATCH v2 11/12] net/octeontx2: support port representor " Ivan Malov
2021-10-10 0:05 ` [dpdk-dev] [PATCH v2 12/12] net/sfc: support port representor flow item Ivan Malov
2021-10-10 14:39 ` [dpdk-dev] [PATCH v3 00/12] ethdev: rework transfer flow API Ivan Malov
2021-10-10 14:39 ` [dpdk-dev] [PATCH v3 01/12] ethdev: add port representor item to " Ivan Malov
2021-10-11 11:49 ` Ori Kam
2021-10-12 12:39 ` Andrew Rybchenko
2021-10-12 20:55 ` Slava Ovsiienko
2021-10-12 23:14 ` Ivan Malov
2021-10-13 18:26 ` Slava Ovsiienko
2021-10-13 11:52 ` Ferruh Yigit
2021-10-10 14:39 ` [dpdk-dev] [PATCH v3 02/12] ethdev: add represented port " Ivan Malov
2021-10-11 11:51 ` Ori Kam
2021-10-12 12:39 ` Andrew Rybchenko
2021-10-10 14:39 ` [dpdk-dev] [PATCH v3 03/12] ethdev: add port representor action " Ivan Malov
2021-10-11 18:18 ` Ori Kam
2021-10-12 12:39 ` Andrew Rybchenko
2021-10-10 14:39 ` [dpdk-dev] [PATCH v3 04/12] ethdev: add represented port " Ivan Malov
2021-10-11 18:20 ` Ori Kam
2021-10-12 12:40 ` Andrew Rybchenko
2021-10-10 14:39 ` [dpdk-dev] [PATCH v3 05/12] ethdev: deprecate hard-to-use or ambiguous items and actions Ivan Malov
2021-10-11 18:23 ` Ori Kam
2021-10-12 12:40 ` Andrew Rybchenko
2021-10-13 11:53 ` Ferruh Yigit
2021-10-10 14:39 ` [dpdk-dev] [PATCH v3 06/12] ethdev: deprecate direction attributes in transfer flows Ivan Malov
2021-10-11 18:33 ` Ori Kam
2021-10-12 12:40 ` Andrew Rybchenko
2021-10-10 14:39 ` [dpdk-dev] [PATCH v3 07/12] net/bnxt: support meta flow items to match on traffic source Ivan Malov
2021-10-10 14:39 ` [dpdk-dev] [PATCH v3 08/12] net/bnxt: support meta flow actions to overrule destinations Ivan Malov
2021-10-10 14:39 ` [dpdk-dev] [PATCH v3 09/12] net/enic: " Ivan Malov
2021-10-12 17:03 ` Hyong Youb Kim (hyonkim)
2021-10-10 14:39 ` [dpdk-dev] [PATCH v3 10/12] net/mlx5: support represented port flow action Ivan Malov
2021-10-12 21:23 ` Slava Ovsiienko
2021-10-10 14:39 ` [dpdk-dev] [PATCH v3 11/12] net/octeontx2: support port representor " Ivan Malov
2021-10-10 14:39 ` [dpdk-dev] [PATCH v3 12/12] net/sfc: support port representor flow item Ivan Malov
2021-10-12 14:45 ` [dpdk-dev] [PATCH v3 00/12] ethdev: rework transfer flow API Ferruh Yigit
2021-10-13 11:51 ` Ferruh Yigit
2021-10-13 16:42 ` [dpdk-dev] [PATCH v4 " Ivan Malov
2021-10-13 16:42 ` [dpdk-dev] [PATCH v4 01/12] ethdev: add port representor item to " Ivan Malov
2021-10-13 16:42 ` [dpdk-dev] [PATCH v4 02/12] ethdev: add represented port " Ivan Malov
2021-10-13 16:42 ` [dpdk-dev] [PATCH v4 03/12] ethdev: add port representor action " Ivan Malov
2021-10-13 16:42 ` [dpdk-dev] [PATCH v4 04/12] ethdev: add represented port " Ivan Malov
2021-10-13 16:42 ` [dpdk-dev] [PATCH v4 05/12] ethdev: deprecate hard-to-use or ambiguous items and actions Ivan Malov
2021-10-13 16:42 ` [dpdk-dev] [PATCH v4 06/12] ethdev: deprecate direction attributes in transfer flows Ivan Malov
2021-10-13 16:42 ` [dpdk-dev] [PATCH v4 07/12] net/bnxt: support meta flow items to match on traffic source Ivan Malov
2021-10-13 16:42 ` [dpdk-dev] [PATCH v4 08/12] net/bnxt: support meta flow actions to overrule destinations Ivan Malov
2021-10-13 16:42 ` [dpdk-dev] [PATCH v4 09/12] net/enic: " Ivan Malov
2021-10-13 16:42 ` [dpdk-dev] [PATCH v4 10/12] net/mlx5: support represented port flow action Ivan Malov
2021-10-13 16:42 ` [dpdk-dev] [PATCH v4 11/12] net/octeontx2: support port representor " Ivan Malov
2021-10-13 16:42 ` [dpdk-dev] [PATCH v4 12/12] net/sfc: support port representor flow item Ivan Malov
2021-10-13 16:57 ` [dpdk-dev] [PATCH v4 00/12] ethdev: rework transfer flow API Ivan Malov
2021-10-13 16:57 ` [dpdk-dev] [PATCH v5 01/12] ethdev: add port representor item to " Ivan Malov
2021-10-13 16:57 ` [dpdk-dev] [PATCH v5 02/12] ethdev: add represented port " Ivan Malov
2021-10-13 16:57 ` [dpdk-dev] [PATCH v5 03/12] ethdev: add port representor action " Ivan Malov
2021-10-13 16:57 ` [dpdk-dev] [PATCH v5 04/12] ethdev: add represented port " Ivan Malov
2021-10-13 16:57 ` [dpdk-dev] [PATCH v5 05/12] ethdev: deprecate hard-to-use or ambiguous items and actions Ivan Malov
2021-10-13 16:57 ` [dpdk-dev] [PATCH v5 06/12] ethdev: deprecate direction attributes in transfer flows Ivan Malov
2021-10-13 16:57 ` [dpdk-dev] [PATCH v5 07/12] net/bnxt: support meta flow items to match on traffic source Ivan Malov
2021-10-13 16:57 ` [dpdk-dev] [PATCH v5 08/12] net/bnxt: support meta flow actions to overrule destinations Ivan Malov
2021-10-13 16:57 ` [dpdk-dev] [PATCH v5 09/12] net/enic: " Ivan Malov
2021-10-13 16:57 ` [dpdk-dev] [PATCH v5 10/12] net/mlx5: support represented port flow action Ivan Malov
2021-10-13 16:57 ` [dpdk-dev] [PATCH v5 11/12] net/octeontx2: support port representor " Ivan Malov
2021-10-13 16:57 ` [dpdk-dev] [PATCH v5 12/12] net/sfc: support port representor flow item Ivan Malov
2021-10-13 17:02 ` [dpdk-dev] [PATCH v6 00/12] ethdev: rework transfer flow API Ivan Malov
2021-10-13 17:02 ` [dpdk-dev] [PATCH v6 01/12] ethdev: add port representor item to " Ivan Malov
2021-10-13 17:15 ` Andrew Rybchenko
2021-10-13 17:02 ` [dpdk-dev] [PATCH v6 02/12] ethdev: add represented port " Ivan Malov
2021-10-13 17:02 ` [dpdk-dev] [PATCH v6 03/12] ethdev: add port representor action " Ivan Malov
2021-10-13 17:02 ` [dpdk-dev] [PATCH v6 04/12] ethdev: add represented port " Ivan Malov
2021-10-13 17:02 ` [dpdk-dev] [PATCH v6 05/12] ethdev: deprecate hard-to-use or ambiguous items and actions Ivan Malov
2021-10-13 17:02 ` [dpdk-dev] [PATCH v6 06/12] ethdev: deprecate direction attributes in transfer flows Ivan Malov
2021-10-13 17:02 ` [dpdk-dev] [PATCH v6 07/12] net/bnxt: support meta flow items to match on traffic source Ivan Malov
2021-10-13 17:02 ` [dpdk-dev] [PATCH v6 08/12] net/bnxt: support meta flow actions to overrule destinations Ivan Malov
2021-10-13 17:02 ` [dpdk-dev] [PATCH v6 09/12] net/enic: " Ivan Malov
2021-10-13 17:02 ` [dpdk-dev] [PATCH v6 10/12] net/mlx5: support represented port flow action Ivan Malov
2021-10-13 18:02 ` Slava Ovsiienko
2021-10-13 17:02 ` [dpdk-dev] [PATCH v6 11/12] net/octeontx2: support port representor " Ivan Malov
2021-10-13 17:02 ` [dpdk-dev] [PATCH v6 12/12] net/sfc: support port representor flow item Ivan Malov
2021-10-13 17:34 ` [dpdk-dev] [PATCH v7 00/12] ethdev: rework transfer flow API Ivan Malov
2021-10-13 17:34 ` [dpdk-dev] [PATCH v7 01/12] ethdev: add port representor item to " Ivan Malov
2021-10-13 17:34 ` [dpdk-dev] [PATCH v7 02/12] ethdev: add represented port " Ivan Malov
2021-10-13 17:34 ` [dpdk-dev] [PATCH v7 03/12] ethdev: add port representor action " Ivan Malov
2021-10-13 17:34 ` [dpdk-dev] [PATCH v7 04/12] ethdev: add represented port " Ivan Malov
2021-10-13 17:34 ` [dpdk-dev] [PATCH v7 05/12] ethdev: deprecate hard-to-use or ambiguous items and actions Ivan Malov
2021-10-13 17:34 ` [dpdk-dev] [PATCH v7 06/12] ethdev: deprecate direction attributes in transfer flows Ivan Malov
2021-10-13 18:48 ` Slava Ovsiienko
2021-10-13 17:34 ` [dpdk-dev] [PATCH v7 07/12] net/bnxt: support meta flow items to match on traffic source Ivan Malov
2021-10-13 17:34 ` [dpdk-dev] [PATCH v7 08/12] net/bnxt: support meta flow actions to overrule destinations Ivan Malov
2021-10-13 17:34 ` [dpdk-dev] [PATCH v7 09/12] net/enic: " Ivan Malov
2021-10-13 17:34 ` [dpdk-dev] [PATCH v7 10/12] net/mlx5: support represented port flow action Ivan Malov
2021-10-13 17:34 ` [dpdk-dev] [PATCH v7 11/12] net/octeontx2: support port representor " Ivan Malov
2021-10-20 2:33 ` [dpdk-dev] [EXT] " Kiran Kumar Kokkilagadda
2021-10-13 17:34 ` [dpdk-dev] [PATCH v7 12/12] net/sfc: support port representor flow item Ivan Malov
2021-10-13 21:08 ` [dpdk-dev] [PATCH v7 00/12] ethdev: rework transfer flow API Ferruh Yigit
2021-10-05 0:36 ` [dpdk-dev] [PATCH] ethdev: let apps find transfer admin port for a given ethdev Ivan Malov
2021-10-05 9:22 ` Ori Kam
2021-10-05 12:41 ` Ivan Malov
2021-10-05 16:04 ` Ori Kam
2021-10-05 17:56 ` Thomas Monjalon
2021-10-05 18:22 ` Ivan Malov
2021-10-05 19:04 ` Thomas Monjalon
2021-10-05 21:10 ` [dpdk-dev] [PATCH v2] ethdev: add API to query proxy port to manage transfer flows Ivan Malov
2021-10-06 7:47 ` Andrew Rybchenko [this message]
2021-10-06 12:33 ` [dpdk-dev] [PATCH v3] " Ivan Malov
2021-10-14 3:21 ` [dpdk-dev] [PATCH v4] " Ivan Malov
2021-10-14 11:45 ` Ferruh Yigit
2021-10-26 14:46 ` David Marchand
2021-10-26 15:47 ` Ivan Malov
2021-10-26 15:58 ` Thomas Monjalon
2021-10-26 16:15 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a3e516da-8550-a49a-e037-39e8cb38647b@oktetlabs.ru \
--to=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=ivan.malov@oktetlabs.ru \
--cc=mdr@ashroe.eu \
--cc=orika@nvidia.com \
--cc=thomas@monjalon.net \
--cc=xiaoyun.li@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).