History log of /dpdk/app/test-pmd/cmdline_flow.c (Results 1 – 25 of 288)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v24.11, v24.11-rc4
# f86085ca 21-Nov-2024 Stephen Hemminger <stephen@networkplumber.org>

app/testpmd: avoid potential outside of array reference

The order of comparison is wrong, and potentially allows
referencing past the array.

Link: https://pvs-studio.com/en/blog/posts/cpp/1179/
Fix

app/testpmd: avoid potential outside of array reference

The order of comparison is wrong, and potentially allows
referencing past the array.

Link: https://pvs-studio.com/en/blog/posts/cpp/1179/
Fixes: 3e3edab530a1 ("ethdev: add flow quota")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>

show more ...


Revision tags: v24.11-rc3, v24.11-rc2, v24.11-rc1
# 52e04a63 18-Oct-2024 Robin Jarry <rjarry@redhat.com>

cmdline: use IPv6 address structure

The previous commits introduced a new rte_ipv6_addr structure without
any alignment requirements. It is not compatible with the in6_addr POSIX
type available in n

cmdline: use IPv6 address structure

The previous commits introduced a new rte_ipv6_addr structure without
any alignment requirements. It is not compatible with the in6_addr POSIX
type available in netinet/in.h.

The main issue is that in6_addr is not uniform on all platforms which
causes unaligned access warnings when compiling without
-Wno-address-of-packed-member (set in dpdk by default).

In order to have a consistent code base, replace in6_addr with
rte_ipv6_addr in the cmdline library. Update all code accordingly.

Signed-off-by: Robin Jarry <rjarry@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

show more ...


# d5c50397 18-Sep-2024 Viacheslav Ovsiienko <viacheslavo@nvidia.com>

app/testpmd: remove flex item init command leftover

There was a leftover of "flow flex init" command used
for debug purposes and had no useful functionality in
the production code.

Fixes: 59f3a8acb

app/testpmd: remove flex item init command leftover

There was a leftover of "flow flex init" command used
for debug purposes and had no useful functionality in
the production code.

Fixes: 59f3a8acbcdb ("app/testpmd: add flex item commands")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

show more ...


# e0d947a1 04-Oct-2024 Ferruh Yigit <ferruh.yigit@amd.com>

ethdev: convert string initialization

gcc 15 experimental [1], with -Wextra flag, gives warning in variable
initialization as string [2].

The warning has a point when initialized variable is intend

ethdev: convert string initialization

gcc 15 experimental [1], with -Wextra flag, gives warning in variable
initialization as string [2].

The warning has a point when initialized variable is intended to use as
string, since assignment is missing the required null terminator for
this case. But warning is useless for our usecase.

In this patch only updated a few instance to show the issue, there are
many instances to fix, if we prefer to go this way.
Other option is to disable warning but it can be useful for actual
string usecases, so I prefer to keep it.

Converted string initialization to array initialization.

[1]
gcc (GCC) 15.0.0 20241003 (experimental)

[2]
../lib/ethdev/rte_flow.h:906:36:
error: initializer-string for array of ‘unsigned char’ is too long
[-Werror=unterminated-string-initialization]
906 | .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~

../lib/ethdev/rte_flow.h:907:36:
error: initializer-string for array of ‘unsigned char’ is too long
[-Werror=unterminated-string-initialization]
907 | .hdr.src_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~

../lib/ethdev/rte_flow.h:1009:25:
error: initializer-string for array of ‘unsigned char’ is too long
[-Werror=unterminated-string-initialization]
1009 | "\xff\xff\xff\xff\xff\xff\xff\xff"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../lib/ethdev/rte_flow.h:1012:25:
error: initializer-string for array of ‘unsigned char’ is too long
[-Werror=unterminated-string-initialization]
1012 | "\xff\xff\xff\xff\xff\xff\xff\xff"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../lib/ethdev/rte_flow.h:1135:20:
error: initializer-string for array of ‘unsigned char’ is too long
[-Werror=unterminated-string-initialization]
1135 | .hdr.vni = "\xff\xff\xff",
| ^~~~~~~~~~~~~~

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

show more ...


# 2c52a2b3 25-Sep-2024 Alexander Kozyrev <akozyrev@nvidia.com>

ethdev: add jump to table index action

Introduce the RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX action.
It redirects packets to a particular index in a flow table.

testpmd example:
flow queue 0 creat

ethdev: add jump to table index action

Introduce the RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX action.
It redirects packets to a particular index in a flow table.

testpmd example:
flow queue 0 create 0 template_table 0 pattern_template 0
actions_template 0 postpone no pattern eth / end
actions jump_to_table_index table 0x166f9ce00 index 5 / end

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>

show more ...


# 933f18db 25-Sep-2024 Alexander Kozyrev <akozyrev@nvidia.com>

ethdev: add flow rule by index with pattern

Add a new API to enqueue flow rule creation by index with pattern.
The new template table rules insertion type,
index-based insertion with pattern, requir

ethdev: add flow rule by index with pattern

Add a new API to enqueue flow rule creation by index with pattern.
The new template table rules insertion type,
index-based insertion with pattern, requires a new flow rule creation
function with both rule index and pattern provided.
Packets will match on the provided pattern at the provided index.

In testpmd, allow to specify both the rule index and the pattern
in the flow rule creation command line parameters.
Both are needed for rte_flow_async_create_by_index_with_pattern().

flow queue 0 create 0 template_table 2 rule_index 5
pattern_template 0 actions_template 0 postpone no pattern eth / end
actions count / queue index 1 / end

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>

show more ...


# 29e7c626 25-Sep-2024 Alexander Kozyrev <akozyrev@nvidia.com>

ethdev: add flow rule insertion mode by index with pattern

There are two flow table rules insertion type today:
pattern-based insertion when packets match on the pattern and
index-based insertion wh

ethdev: add flow rule insertion mode by index with pattern

There are two flow table rules insertion type today:
pattern-based insertion when packets match on the pattern and
index-based insertion when packets always hit at the index.
We need another mode that allows to match on the pattern at
the index: insertion by index with pattern.

testpmd example:
flow template_table 0 create table_id 2 group 13 priority 0
insertion_type index_with_pattern ingress rules_number 64
pattern_template 2 actions_template 2

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>

show more ...


Revision tags: v24.07, v24.07-rc4, v24.07-rc3
# 389fca75 23-Jul-2024 Gavin Li <gavinl@nvidia.com>

app/testpmd: restore deprecated VXLAN-GPE item support

VXLAN-GPE support was removed from testpmd recently.
Drivers which are not migrated to the new unified VXLAN item
are still using VXLAN-GPE in

app/testpmd: restore deprecated VXLAN-GPE item support

VXLAN-GPE support was removed from testpmd recently.
Drivers which are not migrated to the new unified VXLAN item
are still using VXLAN-GPE in tests.

This commit is to restore the support of
the deprecated VXLAN-GPE flow item in testpmd.

After this change, there are two command line items with the same name,
ie. "protocol". One is for the new VXLAN extensions
and the other is for the deprecated VXLAN-GPE item.
Add a new one that is more obvious for the new VXLAN structure
since the two have different command line context.

Fixes: da118115d95c ("app/testpmd: support matching any VXLAN field")

Signed-off-by: Gavin Li <gavinl@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

show more ...


# 8e74ca6d 17-Jul-2024 Alexander Kozyrev <akozyrev@nvidia.com>

app/testpmd: add postpone option to async flow destroy

The postpone option is not available in the async flow destroy CLI.
Only flow creation can be postponed in the testpmd application.
Insert this

app/testpmd: add postpone option to async flow destroy

The postpone option is not available in the async flow destroy CLI.
Only flow creation can be postponed in the testpmd application.
Insert this option into the async flow destroy CLI before the rule ID.

Fixes: ecdc927b99f2 ("app/testpmd: add async flow create/destroy operations")
Cc: stable@dpdk.org

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Reviewed-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

show more ...


Revision tags: v24.07-rc2, v24.07-rc1
# 944e5f43 02-Jun-2024 Maayan Kashani <mkashani@nvidia.com>

app/testpmd: fix parsing for connection tracking item

In command line translation there were missing fields for
connection tracking item, as a result this item was not parsed
and was missing from th

app/testpmd: fix parsing for connection tracking item

In command line translation there were missing fields for
connection tracking item, as a result this item was not parsed
and was missing from the items list received from test-pmd.

Fixes: 4d07cbefe3ba ("app/testpmd: add commands for conntrack")
Cc: stable@dpdk.org

Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

show more ...


# da118115 05-Jun-2024 Gavin Li <gavinl@nvidia.com>

app/testpmd: support matching any VXLAN field

VXLAN extensions (VXLAN-GPE and VXLAN-GBP) are unified
in a single VXLAN flow item.

It is user responsibility to explicitly match VXLAN-GPE with its UD

app/testpmd: support matching any VXLAN field

VXLAN extensions (VXLAN-GPE and VXLAN-GBP) are unified
in a single VXLAN flow item.

It is user responsibility to explicitly match VXLAN-GPE with its UDP port.
Below are examples to match standard VXLAN, VXLAN-GPE and VXLAN-GBP.
To match standard vxlan,
... / udp dst is 4789 / vxlan ... / ...
To match VXLAN-GBP, group policy ID is 4321,
... / udp dst is 4789 / vxlan flag_g is 1 group_policy_id is 4321 ... / ...
To match VXLAN-GPE, next protocol is IPv6
... / udp dst is 4790 / vxlan flag_p is 1 protocol is 2 ... / ...

Signed-off-by: Gavin Li <gavinl@nvidia.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ori Kam <orika@nvidia.com>

show more ...


# 5259e8cf 07-Jun-2024 Rongwei Liu <rongweil@nvidia.com>

ethdev: add VXLAN last reserved field

Add "uint8_t last_rsvd" as union with origin rsvd1.
Add RTE_FLOW_FIELD_VXLAN_LAST_RSVD into rte flow packet
field.

The new union is used by testpmd matching it

ethdev: add VXLAN last reserved field

Add "uint8_t last_rsvd" as union with origin rsvd1.
Add RTE_FLOW_FIELD_VXLAN_LAST_RSVD into rte flow packet
field.

The new union is used by testpmd matching item VXLAN
"last_rsvd" and modify target RTE_FLOW_FIELD_VXLAN_LAST_RSVD.

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>

show more ...


# 1ce8ef0e 07-Jun-2024 Rongwei Liu <rongweil@nvidia.com>

app/testpmd: fix flow field string sequence

The field string should be in the same order as the rte_flow_field_id
enumration definitions

Fixes: bfc007802da7 ("ethdev: allow modifying IPv6 FL and TC

app/testpmd: fix flow field string sequence

The field string should be in the same order as the rte_flow_field_id
enumration definitions

Fixes: bfc007802da7 ("ethdev: allow modifying IPv6 FL and TC fields")
Fixes: d66aa38f431d ("ethdev: allow modifying IPsec fields")
Fixes: b160da13b398 ("ethdev: allow modifying IPv4 next protocol field")
Cc: stable@dpdk.org

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>

show more ...


Revision tags: v24.03, v24.03-rc4
# aaa5b54d 18-Mar-2024 Shani Peretz <shperetz@nvidia.com>

app/testpmd: fix auto-completion for indirect action list

In the process of auto completion of a command in testpmd,
the parser splits the command into tokens, where each token
represents an argumen

app/testpmd: fix auto-completion for indirect action list

In the process of auto completion of a command in testpmd,
the parser splits the command into tokens, where each token
represents an argument and defines a parsing function.
The parsing function of the indirect_list action argument was returning
before having the opportunity to handle the argument.

The fix ensures that the function appropriately handles
the argument before finishing.

Fixes: 72a3dec7126f ("ethdev: add indirect flow list action")
Cc: stable@dpdk.org

Signed-off-by: Shani Peretz <shperetz@nvidia.com>
Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>

show more ...


Revision tags: v24.03-rc3, v24.03-rc2
# c1496cb6 07-Mar-2024 Gregory Etelson <getelson@nvidia.com>

app/testpmd: fix async indirect action list creation

Testpmd calls the same function to create legacy indirect action and
indirect list action.
The function did not identify required action correctl

app/testpmd: fix async indirect action list creation

Testpmd calls the same function to create legacy indirect action and
indirect list action.
The function did not identify required action correctly.

The patch adds the `indirect_list` boolean function parameter that is
derived from the action type.

Fixes: 72a3dec7126f ("ethdev: add indirect flow list action")
Cc: stable@dpdk.org

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

show more ...


# 2d9c7e56 29-Feb-2024 Oleksandr Kolomeiets <okl-plv@napatech.com>

app/testpmd: support updating flow rule actions

"flow update" updates a flow rule specified by a rule ID with a
new action list by making a call to "rte_flow_actions_update()":

flow update {por

app/testpmd: support updating flow rule actions

"flow update" updates a flow rule specified by a rule ID with a
new action list by making a call to "rte_flow_actions_update()":

flow update {port_id} {rule_id}
actions {action} [/ {action} [...]] / end [user_id]

Creating, updating and destroying a flow rule:

testpmd> flow create 0 group 1 pattern eth / end actions drop / end
Flow rule #0 created
testpmd> flow update 0 0 actions queue index 1 / end
Flow rule #0 updated with new actions
testpmd> flow destroy 0 rule 0
Flow rule #0 destroyed

Signed-off-by: Oleksandr Kolomeiets <okl-plv@napatech.com>
Reviewed-by: Mykola Kostenok <mko-plv@napatech.com>
Reviewed-by: Christian Koue Muf <ckm@napatech.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

show more ...


# c68992be 23-Feb-2024 Rongwei Liu <rongweil@nvidia.com>

app/testpmd: fix flow modify tag typo

Update the name to the right one: "src_tag_index"

Fixes: c23626f27b09 ("ethdev: add MPLS header modification")
Cc: stable@dpdk.org

Signed-off-by: Rongwei Liu

app/testpmd: fix flow modify tag typo

Update the name to the right one: "src_tag_index"

Fixes: c23626f27b09 ("ethdev: add MPLS header modification")
Cc: stable@dpdk.org

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

show more ...


Revision tags: v24.03-rc1
# bfc00780 07-Feb-2024 Michael Baum <michaelba@nvidia.com>

ethdev: allow modifying IPv6 FL and TC fields

Add new "rte_flow_field_id" enumeration values to describe both IPv6
traffic class and IPv6 flow label fields.

The TC value is "RTE_FLOW_FIELD_IPV6_TRA

ethdev: allow modifying IPv6 FL and TC fields

Add new "rte_flow_field_id" enumeration values to describe both IPv6
traffic class and IPv6 flow label fields.

The TC value is "RTE_FLOW_FIELD_IPV6_TRAFFIC_CLASS" in flow API and
"ipv6_traffic_class" in testpmd command.
The FL value is "RTE_FLOW_FIELD_IPV6_FLOW_LABEL" in flow API and
"ipv6_flow_label" in testpmd command.

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

show more ...


# d66aa38f 07-Feb-2024 Viacheslav Ovsiienko <viacheslavo@nvidia.com>

ethdev: allow modifying IPsec fields

The following IPsec related field definitions added:

- RTE_FLOW_FIELD_ESP_SPI - SPI value in IPsec header
- RTE_FLOW_FIELD_ESP_SEQ_NUM - sequence number in he

ethdev: allow modifying IPsec fields

The following IPsec related field definitions added:

- RTE_FLOW_FIELD_ESP_SPI - SPI value in IPsec header
- RTE_FLOW_FIELD_ESP_SEQ_NUM - sequence number in header
- RTE_FLOW_FIELD_ESP_PROTO - next protocol value in trailer

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

show more ...


# b160da13 07-Feb-2024 Viacheslav Ovsiienko <viacheslavo@nvidia.com>

ethdev: allow modifying IPv4 next protocol field

Add IPv4 next protocol modify field definition.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Ac

ethdev: allow modifying IPv4 next protocol field

Add IPv4 next protocol modify field definition.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

show more ...


# 32dced79 12-Jan-2024 Gavin Li <gavinl@nvidia.com>

app/testpmd: support VXLAN-GPE reserved fields matching

Add support for VXLAN-GPE rsvd0 and rsvd1 fields in flow rule pattern to
testpmd

Signed-off-by: Gavin Li <gavinl@nvidia.com>
Acked-by: Darius

app/testpmd: support VXLAN-GPE reserved fields matching

Add support for VXLAN-GPE rsvd0 and rsvd1 fields in flow rule pattern to
testpmd

Signed-off-by: Gavin Li <gavinl@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

show more ...


# 20313fa7 12-Jan-2024 Gavin Li <gavinl@nvidia.com>

app/testpmd: support VXLAN-GPE flags matching

Add support for VXLAN-GPE flags field in flow rule pattern to testpmd.

Signed-off-by: Gavin Li <gavinl@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnow

app/testpmd: support VXLAN-GPE flags matching

Add support for VXLAN-GPE flags field in flow rule pattern to testpmd.

Signed-off-by: Gavin Li <gavinl@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

show more ...


# 99231e48 15-Feb-2024 Gregory Etelson <getelson@nvidia.com>

ethdev: add template table resize

Template table creation API sets table flows capacity.
If application needs more flows then the table was designed for,
the following procedures must be completed:

ethdev: add template table resize

Template table creation API sets table flows capacity.
If application needs more flows then the table was designed for,
the following procedures must be completed:
1. Create a new template table with larger flows capacity.
2. Re-create existing flows in the new table and delete flows from
the original table.
3. Destroy original table.

Application cannot always execute that procedure:
* Port may not have sufficient resources to allocate a new table
while maintaining original table.
* Application may not have existing flows "recipes" to re-create
flows in a new table.

The patch defines a new API that allows application to resize
existing template table:

* Resizable template table must be created with the
RTE_FLOW_TABLE_SPECIALIZE_RESIZABLE_TABLE bit set.

* Application resizes existing table with the
`rte_flow_template_table_resize()` function call.
The table resize procedure updates the table maximal flow number
only. Other table attributes are not affected by the table resize.
** The table resize procedure must not interrupt
existing table flows operations in hardware.
** The table resize procedure must not alter flow handles held by
application.

* After `rte_flow_template_table_resize()` returned, application must
update table flow rules by calling
`rte_flow_async_update_resized()`.
The call reconfigures internal flow resources for the new table
configuration.
The flow update must not interrupt hardware flow operations.

* After table flows were updated, application must call
`rte_flow_template_table_resize_complete()`.
The function releases PMD resources related to the original
table.
Application can start new table resize after
`rte_flow_template_table_resize_complete()` returned.

Testpmd commands:

* Create resizable template table
flow template_table <port-id> create table_id <tbl-id> resizable \
[transfer|ingress|egres] group <group-id> \
rules_number <initial table capacity> \
pattern_template <pt1> [ pattern_template <pt2> [ ... ]] \
actions_template <at1> [ actions_template <at2> [ ... ]]

* Resize table:
flow template_table <tbl-id> resize table_resize_id <tbl-id> \
table_resize_rules_num <new table capacity>

* Queue a flow update:
flow queue <port-id> update_resized <tbl-id> rule <flow-id>

* Complete table resize:
flow template_table <port-id> resize_complete table <tbl-id>

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>

show more ...


# 9733f099 13-Feb-2024 Ori Kam <orika@nvidia.com>

ethdev: add encapsulation hash calculation

During encapsulation of a packet, it is possible to change some
outer headers to improve flow distribution.
For example, from VXLAN RFC:
"It is recommended

ethdev: add encapsulation hash calculation

During encapsulation of a packet, it is possible to change some
outer headers to improve flow distribution.
For example, from VXLAN RFC:
"It is recommended that the UDP source port number
be calculated using a hash of fields from the inner packet --
one example being a hash of the inner Ethernet frame's headers.
This is to enable a level of entropy for the ECMP/load-balancing"

The tunnel protocol defines which outer field should hold this hash,
but it doesn't define the hash calculation algorithm.

An application that uses flow offloads gets the first few packets
(exception path) and then decides to offload the flow.
As a result, there are two different paths that a packet from a given
flow may take. SW for the first few packets or HW for the rest.
When the packet goes through the SW, the SW encapsulates the packet
and must use the same hash calculation as the HW will do for
the rest of the packets in this flow.

The new function rte_flow_calc_encap_hash can query the hash value
from the driver for a given packet as if the packet was passed
through the HW.

Testpmd command:
flow hash {port} encap {target field}
pattern {item} [/ {item} [...] ] / end

Testpmd example for VXLAN encapsulation:
flow hash 0 encap hash_field_sport
pattern ipv4 dst is 7.7.7.7 src is 8.8.8.8 /
udp dst is 5678 src is 1234 / end

Signed-off-by: Ori Kam <orika@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

show more ...


Revision tags: v23.11, v23.11-rc4, v23.11-rc3, v23.11-rc2
# 38034a46 26-Oct-2023 Gregory Etelson <getelson@nvidia.com>

app/testpmd: add size parameter to raw encap action

Testpmd always provides RAW_ENCAP flow action configuration with
encap buffer and the buffer size.
That implementation does not allow to create no

app/testpmd: add size parameter to raw encap action

Testpmd always provides RAW_ENCAP flow action configuration with
encap buffer and the buffer size.
That implementation does not allow to create non-masked raw_encap
action in the template API actions template.

The patch adds the `size` parameter to testpmd `raw_encap` action
configuration.
Testpmd can create non-masked raw-encap action template and specify
encap buffer during flow creation.

Example:

// total data size is 50
testpmd> set raw_encap 0 \
eth src is 11:22:33:44:55:66 dst is aa:bb:cc:dd:01:aa / \
ipv4 src is 31.31.31.31 dst is 63.63.63.1 / udp src is 1 / \
vxlan vni is 1 / end_set

testpmd> flow actions_template 0 create ingress \
actions_template_id 50 \
template raw_encap size 50 / jump / end \
mask raw_encap size 50 / jump / end \

tstpmd> flow queue 0 create 0 template_table 0 \
pattern_template 0 actions_template 0 postpone no \
pattern ... end \
actions raw_encap index 0 / jump group 1 / end

The new `size` parameter is mutually exclusive with the existing
`index` parameter.

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

show more ...


12345678910>>...12