From: Ori Kam <orika@nvidia.com>
To: Bing Zhao <bingz@nvidia.com>,
"aman.deep.singh@intel.com" <aman.deep.singh@intel.com>,
"yuying.zhang@intel.com" <yuying.zhang@intel.com>,
Dariusz Sosnowski <dsosnowski@nvidia.com>,
Slava Ovsiienko <viacheslavo@nvidia.com>,
Suanming Mou <suanmingm@nvidia.com>,
Matan Azrad <matan@nvidia.com>,
"NBU-Contact-Thomas Monjalon (EXTERNAL)" <thomas@monjalon.net>,
"ferruh.yigit@amd.com" <ferruh.yigit@amd.com>,
"andrew.rybchenko@oktetlabs.ru" <andrew.rybchenko@oktetlabs.ru>,
"dev@dpdk.org" <dev@dpdk.org>,
Raslan Darawsheh <rasland@nvidia.com>
Subject: RE: [PATCH v2 2/2] app/testpmd: add support for NAT64 in the command line
Date: Thu, 1 Feb 2024 08:38:46 +0000 [thread overview]
Message-ID: <MW2PR12MB46665927E71905410EC2E495D6432@MW2PR12MB4666.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20240131093804.357465-3-bingz@nvidia.com>
> -----Original Message-----
> From: Bing Zhao <bingz@nvidia.com>
> Sent: Wednesday, January 31, 2024 11:38 AM
>
> The type of NAT64 action will be parsed.
>
> Usage example with template API:
> ...
> flow actions_template 0 create ingress actions_template_id 1 \
> template count / nat64 / jump / end mask count / nat64 / \
> jump / end
> flow template_table 0 create group 1 priority 0 ingress table_id \
> 0x1 rules_number 8 pattern_template 0 actions_template 1
> flow queue 0 create 2 template_table 0x1 pattern_template 0 \
> actions_template 0 postpone no pattern eth / end actions count / \
> nat64 type 1 / jump group 2 / end
> ...
>
> Signed-off-by: Bing Zhao <bingz@nvidia.com>
> ---
> app/test-pmd/cmdline_flow.c | 23 +++++++++++++++++++++
> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 ++++
> 2 files changed, 27 insertions(+)
>
> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> index 4062879552..d26986a9ab 100644
> --- a/app/test-pmd/cmdline_flow.c
> +++ b/app/test-pmd/cmdline_flow.c
> @@ -733,6 +733,8 @@ enum index {
> ACTION_IPV6_EXT_PUSH,
> ACTION_IPV6_EXT_PUSH_INDEX,
> ACTION_IPV6_EXT_PUSH_INDEX_VALUE,
> + ACTION_NAT64,
> + ACTION_NAT64_MODE,
> };
>
> /** Maximum size for pattern in struct rte_flow_item_raw. */
> @@ -2209,6 +2211,7 @@ static const enum index next_action[] = {
> ACTION_QUOTA_QU,
> ACTION_IPV6_EXT_REMOVE,
> ACTION_IPV6_EXT_PUSH,
> + ACTION_NAT64,
> ZERO,
> };
>
> @@ -2550,6 +2553,12 @@ static const enum index
> action_represented_port[] = {
> ZERO,
> };
>
> +static const enum index action_nat64[] = {
> + ACTION_NAT64_MODE,
> + ACTION_NEXT,
> + ZERO,
> +};
> +
> static int parse_set_raw_encap_decap(struct context *, const struct token *,
> const char *, unsigned int,
> void *, unsigned int);
> @@ -7077,6 +7086,20 @@ static const struct token token_list[] = {
> .call = parse_vc_action_ipv6_ext_push_index,
> .comp = comp_set_ipv6_ext_index,
> },
> + [ACTION_NAT64] = {
> + .name = "nat64",
> + .help = "NAT64 IP headers translation",
> + .priv = PRIV_ACTION(NAT64, sizeof(struct
> rte_flow_action_nat64)),
> + .next = NEXT(action_nat64),
> + .call = parse_vc,
> + },
> + [ACTION_NAT64_MODE] = {
> + .name = "type",
> + .help = "NAT64 translation type",
> + .next = NEXT(action_nat64,
> NEXT_ENTRY(COMMON_UNSIGNED)),
> + .args = ARGS(ARGS_ENTRY(struct rte_flow_action_nat64,
> type)),
> + .call = parse_vc_conf,
> + },
> /* Top level command. */
> [SET] = {
> .name = "set",
> diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> index 38ab421547..d1801c1b26 100644
> --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> @@ -4169,6 +4169,10 @@ This section lists supported actions and their
> attributes, if any.
> - ``src_ptr``: pointer to source immediate value.
> - ``width``: number of bits to copy.
>
> +- ``nat64``: NAT64 IP headers translation
> +
> + - ``type {unsigned}``: NAT64 translation type
> +
> Destroying flow rules
> ~~~~~~~~~~~~~~~~~~~~~
>
> --
> 2.34.1
Acked-by: Ori Kam <orika@nvidia.com>
Best,
Ori
next prev parent reply other threads:[~2024-02-01 8:38 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-27 9:07 [PATCH 0/8] support NAT64 action Bing Zhao
2023-12-27 9:07 ` [PATCH 1/8] ethdev: introduce " Bing Zhao
2023-12-27 9:07 ` [PATCH 2/8] app/testpmd: add support for NAT64 in the command line Bing Zhao
2023-12-27 9:07 ` [PATCH 3/8] net/mlx5: fetch the available registers for NAT64 Bing Zhao
2023-12-27 9:07 ` [PATCH 4/8] common/mlx5: add new modify field defininations Bing Zhao
2023-12-27 9:07 ` [PATCH 5/8] net/mlx5/hws: support NAT64 action Bing Zhao
2023-12-27 9:07 ` [PATCH 6/8] net/mlx5: create NAT64 actions during configuration Bing Zhao
2023-12-27 9:07 ` [PATCH 7/8] net/mlx5: add NAT64 action support in rule creation Bing Zhao
2023-12-27 9:07 ` [PATCH 8/8] net/mlx5: validate the actions combination with NAT64 Bing Zhao
2024-01-31 9:38 ` [PATCH v2 0/2] support NAT64 action Bing Zhao
2024-01-31 9:38 ` [PATCH v2 1/2] ethdev: introduce " Bing Zhao
2024-02-01 8:38 ` Ori Kam
2024-01-31 9:38 ` [PATCH v2 2/2] app/testpmd: add support for NAT64 in the command line Bing Zhao
2024-02-01 8:38 ` Ori Kam [this message]
2024-02-01 16:00 ` [PATCH v2 0/2] support NAT64 action Ferruh Yigit
2024-02-01 16:05 ` Ferruh Yigit
2024-02-20 14:10 ` [PATCH v2 0/5] NAT64 support in mlx5 PMD Bing Zhao
2024-02-20 14:10 ` [PATCH v2 1/5] net/mlx5/hws: support NAT64 action Bing Zhao
2024-02-20 14:10 ` [PATCH v2 2/5] net/mlx5: fetch the available registers for NAT64 Bing Zhao
2024-02-20 14:10 ` [PATCH v2 3/5] net/mlx5: create NAT64 actions during configuration Bing Zhao
2024-02-20 14:10 ` [PATCH v2 4/5] net/mlx5: add NAT64 action support in rule creation Bing Zhao
2024-02-20 14:10 ` [PATCH v2 5/5] net/mlx5: validate the actions combination with NAT64 Bing Zhao
2024-02-20 14:37 ` [PATCH v3 0/5] NAT64 support in mlx5 PMD Bing Zhao
2024-02-20 14:37 ` [PATCH v3 1/5] net/mlx5/hws: support NAT64 action Bing Zhao
2024-02-20 14:37 ` [PATCH v3 2/5] net/mlx5: fetch the available registers for NAT64 Bing Zhao
2024-02-20 14:37 ` [PATCH v3 3/5] net/mlx5: create NAT64 actions during configuration Bing Zhao
2024-02-20 14:37 ` [PATCH v3 4/5] net/mlx5: add NAT64 action support in rule creation Bing Zhao
2024-02-20 14:37 ` [PATCH v3 5/5] net/mlx5: validate the actions combination with NAT64 Bing Zhao
2024-02-21 13:14 ` [PATCH v3 0/5] NAT64 support in mlx5 PMD Ori Kam
2024-02-28 15:09 ` [PATCH v4 " Bing Zhao
2024-02-28 15:09 ` [PATCH v4 1/5] net/mlx5/hws: support NAT64 action Bing Zhao
2024-02-28 15:09 ` [PATCH v4 2/5] net/mlx5: fetch the available registers for NAT64 Bing Zhao
2024-02-28 15:09 ` [PATCH v4 3/5] net/mlx5: create NAT64 actions during configuration Bing Zhao
2024-02-28 15:09 ` [PATCH v4 4/5] net/mlx5: add NAT64 action support in rule creation Bing Zhao
2024-02-28 15:09 ` [PATCH v4 5/5] net/mlx5: validate the actions combination with NAT64 Bing Zhao
2024-02-29 10:39 ` [PATCH v4 0/5] NAT64 support in mlx5 PMD Raslan Darawsheh
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=MW2PR12MB46665927E71905410EC2E495D6432@MW2PR12MB4666.namprd12.prod.outlook.com \
--to=orika@nvidia.com \
--cc=aman.deep.singh@intel.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=bingz@nvidia.com \
--cc=dev@dpdk.org \
--cc=dsosnowski@nvidia.com \
--cc=ferruh.yigit@amd.com \
--cc=matan@nvidia.com \
--cc=rasland@nvidia.com \
--cc=suanmingm@nvidia.com \
--cc=thomas@monjalon.net \
--cc=viacheslavo@nvidia.com \
--cc=yuying.zhang@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).