History log of /dpdk/lib/ethdev/rte_flow.c (Results 1 – 25 of 71)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v24.11, v24.11-rc4, v24.11-rc3, v24.11-rc2, v24.11-rc1
# be5ded2f 25-Sep-2024 Alexander Kozyrev <akozyrev@nvidia.com>

ethdev: add trace points to flow insertion by index

Adds trace points for rte_flow rule insertion by index functions:
rte_flow_async_create_by_index and
rte_flow_async_create_by_index_with_pattern.

ethdev: add trace points to flow insertion by index

Adds trace points for rte_flow rule insertion by index functions:
rte_flow_async_create_by_index and
rte_flow_async_create_by_index_with_pattern.

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Ori Kam <orika@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 ...


Revision tags: v24.07, v24.07-rc4, v24.07-rc3
# 841a0445 15-Jul-2024 Michael Baum <michaelba@nvidia.com>

ethdev: fix GENEVE option item conversion

The "rte_flow_conv()" function, enables, among other things, to copy
item list.

For GENEVE option item, the function copies it without considering deep
cop

ethdev: fix GENEVE option item conversion

The "rte_flow_conv()" function, enables, among other things, to copy
item list.

For GENEVE option item, the function copies it without considering deep
copy. It copies the "data" pointer without copying the pointed values.

This patch adds deep copy for after regular copy.

Fixes: 2b4c72b4d10d ("ethdev: introduce GENEVE header TLV option item")
Cc: stable@dpdk.org

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

show more ...


Revision tags: v24.07-rc2, v24.07-rc1
# bd6c8808 12-Jun-2024 Dariusz Sosnowski <dsosnowski@nvidia.com>

ethdev: support duplicating only item mask

Extend rte_flow_conv() to support working only on item's mask.
This allows drivers to get only the mask's size when working on pattern
templates and duplic

ethdev: support duplicating only item mask

Extend rte_flow_conv() to support working only on item's mask.
This allows drivers to get only the mask's size when working on pattern
templates and duplicate items having only the mask in a generic way.

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

show more ...


Revision tags: v24.03, v24.03-rc4, v24.03-rc3, v24.03-rc2, v24.03-rc1
# 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 ...


# 537bfdda 06-Feb-2024 Dariusz Sosnowski <dsosnowski@nvidia.com>

ethdev: rework fast path async flow API

This patch reworks the async flow API functions called in data path,
to reduce the overhead during flow operations at the library level.
Main source of the ov

ethdev: rework fast path async flow API

This patch reworks the async flow API functions called in data path,
to reduce the overhead during flow operations at the library level.
Main source of the overhead was indirection and checks done while
ethdev library was fetching rte_flow_ops from a given driver.

This patch introduces rte_flow_fp_ops struct which holds callbacks
to driver's implementation of fast path async flow API functions.
Each driver implementing these functions must populate flow_fp_ops
field inside rte_eth_dev structure with a reference to
its own implementation.
By default, ethdev library provides dummy callbacks with
implementations returning ENOSYS.
Such design provides a few assumptions:

- rte_flow_fp_ops struct for given port is always available.
- Each callback is either:
- Default provided by library.
- Set up by driver.

As a result, no checks for availability of the implementation
are needed at library level in data path.
Any library-level validation checks in async flow API are compiled
if and only if RTE_FLOW_DEBUG macro is defined.

This design was based on changes in ethdev library introduced in [1].

These changes apply only to the following API functions:

- rte_flow_async_create()
- rte_flow_async_create_by_index()
- rte_flow_async_actions_update()
- rte_flow_async_destroy()
- rte_flow_push()
- rte_flow_pull()
- rte_flow_async_action_handle_create()
- rte_flow_async_action_handle_destroy()
- rte_flow_async_action_handle_update()
- rte_flow_async_action_handle_query()
- rte_flow_async_action_handle_query_update()
- rte_flow_async_action_list_handle_create()
- rte_flow_async_action_list_handle_destroy()
- rte_flow_async_action_list_handle_query_update()

This patch also adjusts the mlx5 PMD to the introduced flow API changes.

[1]
commit c87d435a4d79 ("ethdev: copy fast-path API into separate structure")

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

show more ...


# 58143b7b 06-Feb-2024 Suanming Mou <suanmingm@nvidia.com>

ethdev: add flow item for comparison

The new item type is added for the case user wants to match traffic
based on packet field compare result with other fields or immediate
value.

e.g. take advanta

ethdev: add flow item for comparison

The new item type is added for the case user wants to match traffic
based on packet field compare result with other fields or immediate
value.

e.g. take advantage the compare item user will be able to accumulate
a IPv4/TCP packet's TCP data_offset and IPv4 IHL field to a tag
register, then compare the tag register with IPv4 header total length
to understand the packet has payload or not.

The supported operations can be as below:
- RTE_FLOW_ITEM_COMPARE_EQ (equal)
- RTE_FLOW_ITEM_COMPARE_NE (not equal)
- RTE_FLOW_ITEM_COMPARE_LT (less than)
- RTE_FLOW_ITEM_COMPARE_LE (less than or equal)
- RTE_FLOW_ITEM_COMPARE_GT (great than)
- RTE_FLOW_ITEM_COMPARE_GE (great than or equal)

A sample for create the comparison flow:
flow pattern_template 0 create ingress pattern_template_id 1 template \
compare op mask le a_type mask tag a_tag_index mask 1 b_type \
mask tag b_tag_index mask 2 width mask 0xffffffff / end
flow actions_template 0 create ingress actions_template_id 1 template \
count / drop / end mask count / drop / end
flow template_table 0 create table_id 1 group 2 priority 1 ingress \
rules_number 1 pattern_template 1 actions_template 1
flow queue 0 create 0 template_table 1 pattern_template 0 \
actions_template 0 postpone no pattern compare op is le \
a_type is tag a_tag_index is 1 b_type is tag b_tag_index is 2 \
width is 32 / end actions count / drop / end

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

show more ...


# eb704df7 31-Jan-2024 Bing Zhao <bingz@nvidia.com>

ethdev: add NAT64 flow action

In order to support the communication between IPv4 and IPv6 nodes in
the network, different technologies are used, like dual-stacks,
tunneling and NAT64. In some IPv4-o

ethdev: add NAT64 flow action

In order to support the communication between IPv4 and IPv6 nodes in
the network, different technologies are used, like dual-stacks,
tunneling and NAT64. In some IPv4-only clients, it is hard to deploy
new software and(or) hardware to support IPv6 protocol.

NAT64 is a choice and it will also reduce the unnecessary overhead of
the traffic in the network. The NAT64 gateways take the
responsibility of the packet headers translation between the IPv6
clouds and IPv4-only clouds.

The commit introduce the NAT64 flow action to offload the software
involvement to the hardware.

This action should support the offloading of the IP headers'
translation. The following fields should be reset correctly in the
translation.
- Version
- Traffic Class / TOS
- Flow Label (0 in v4)
- Payload Length / Total length
- Next Header
- Hop Limit / TTL

The PMD needs to support the basic conversion of the fields above,
and the well-known prefix will be used when translating IPv4 address
to IPv6 address. Another modify fields can be used after the NAT64 to
support other modes with different prefix and offset.

The ICMP* and transport layers protocol is out of the scope of NAT64
rte_flow action.

Testpmd usage example with flow 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
...

Reference links:
- https://datatracker.ietf.org/doc/html/rfc6146
- https://datatracker.ietf.org/doc/html/rfc6052
- https://datatracker.ietf.org/doc/html/rfc6145

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>

show more ...


# 738ef8f7 14-Dec-2023 Michael Baum <michaelba@nvidia.com>

ethdev: add flow item for random matching

Add support for a new item type "RTE_FLOW_ITEM_TYPE_RANDOM".
This item enables to match on some random value as a part of flow rule.

Example in testpmd:

ethdev: add flow item for random matching

Add support for a new item type "RTE_FLOW_ITEM_TYPE_RANDOM".
This item enables to match on some random value as a part of flow rule.

Example in testpmd:

pattern random spec value 0x1 mask value 0x3 / eth / end

Flow rule with above pattern matching 25% of the traffic, it hits only
when random value suffix is "01" and miss the others ("00", "10", "11").

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>

show more ...


# f59d78b5 30-Nov-2023 Sunyang Wu <sunyang.wu@jaguarmicro.com>

ethdev: fix NVGRE encap flow action description

Fix incorrect definition of 'NVGRE_ENCAP', and
modified the error comments of 'rte_flow_action_nvgre_encap'.

Fixes: c2beb1d469d2 ("ethdev: add missin

ethdev: fix NVGRE encap flow action description

Fix incorrect definition of 'NVGRE_ENCAP', and
modified the error comments of 'rte_flow_action_nvgre_encap'.

Fixes: c2beb1d469d2 ("ethdev: add missing items/actions to flow object converter")
Fixes: 3850cf0c8c37 ("ethdev: add tunnel encap/decap actions")
Cc: stable@dpdk.org

Signed-off-by: Joey Xing <joey.xing@jaguarmicro.com>
Signed-off-by: Sunyang Wu <sunyang.wu@jaguarmicro.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

show more ...


# 08966fe7 13-Feb-2024 Tyler Retzlaff <roretzla@linux.microsoft.com>

use C11 alignof

Replace use of __alignof__(e) (resp. __alignof__(T) with C11
alignof(typeof(e)) (resp. alignof(T)) to improve portability
between toolchains.

Signed-off-by: Tyler Retzlaff <roretzla

use C11 alignof

Replace use of __alignof__(e) (resp. __alignof__(T) with C11
alignof(typeof(e)) (resp. alignof(T)) to improve portability
between toolchains.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

show more ...


# 0e21c7c0 07-Dec-2023 David Marchand <david.marchand@redhat.com>

lib: replace logging helpers

This is a preparation step before the next change.

Many libraries have their own logging helpers that do not add a newline
in their format string.
Some previous changes

lib: replace logging helpers

This is a preparation step before the next change.

Many libraries have their own logging helpers that do not add a newline
in their format string.
Some previous changes fixed places where some of those helpers are
called without a trailing newline.
Using RTE_LOG_LINE in the existing helpers will ensure we don't
introduce new issues in the future.

The problem is that if we simply convert to the RTE_LOG_LINE helper,
a future fix may introduce a regression since the logging helper
change won't be backported.

To address this concern, rename existing helpers: backporting a call to
them will trigger some conflict or build issue in LTS branches.

Note:
- bpf and vhost that still has some debug multilines messages, a direct
call to RTE_LOG/RTE_LOG_DP is used: this will make it easier to notice
such special cases,
- about previously publicly exposed logging helpers, when such helper is
not publicly used (iow in public inline API), it is removed from the
public API (this is the case for the member library),

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

show more ...


Revision tags: v23.11, v23.11-rc4, v23.11-rc3, v23.11-rc2
# 34ff088c 02-Nov-2023 Jie Hai <haijie1@huawei.com>

ethdev: set and query RSS hash algorithm

Currently, rte_eth_rss_conf supports configuring and querying
RSS hash functions, rss key and it's length, but not RSS hash
algorithm.

The structure ``rte_e

ethdev: set and query RSS hash algorithm

Currently, rte_eth_rss_conf supports configuring and querying
RSS hash functions, rss key and it's length, but not RSS hash
algorithm.

The structure ``rte_eth_dev_info`` is extended by adding a new
field "rss_algo_capa". Drivers are responsible for reporting this
capa and configurations of RSS hash algorithm can be verified based
on the capability. The default value of "rss_algo_capa" is
RTE_ETH_HASH_ALGO_CAPA_MASK(DEFAULT) if drivers do not report it.

The structure ``rte_eth_rss_conf`` is extended by adding a new
field "algorithm". This represents the RSS algorithms to apply.
If the value of "algorithm" used for configuration is a gibberish
value, drivers should report the error.

To check whether the drivers report valid "algorithm", it is set
to default value before querying in rte_eth_dev_rss_hash_conf_get().

Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>

show more ...


# 3d67012a 01-Nov-2023 Ruifeng Wang <ruifeng.wang@arm.com>

ethdev: fix 32-bit build with GCC 13

aarch32 build with gcc-13.0.1 generated following warning:

In function 'memcpy',
inlined from 'rte_memcpy' at .../eal/arm/include/rte_memcpy_32.h:296:9,
inlin

ethdev: fix 32-bit build with GCC 13

aarch32 build with gcc-13.0.1 generated following warning:

In function 'memcpy',
inlined from 'rte_memcpy' at .../eal/arm/include/rte_memcpy_32.h:296:9,
inlined from 'rte_flow_conv_action_conf' at .../rte_flow.c:726:20,
inlined from 'rte_flow_conv_actions' at .../ethdev/rte_flow.c:936:10:
warning: '__builtin_memcpy' specified bound 4294967264 exceeds maximum
object size 2147483647 [-Wstringop-overflow=]

The issue is due to possible wrapping in unsigned arithmetic.
The 'size' can be 0. 'off' is 32. When 'tmp' is equal to (unsigned)-32,
the copy length is more than half the address space. Hence the warning.

Cast variables to 64-bit to avoid wrapping.

Fixes: 063911ee1df4 ("ethdev: add flow API object converter")
Cc: stable@dpdk.org

Reported-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

show more ...


# b6c3089d 27-Oct-2023 Wenjing Qiao <wenjing.qiao@intel.com>

ethdev: fix flow program action description

"program" action should also be added in structure rte_flow_desc_action.

Fixes: 8f1953f1914d ("ethdev: add flow API for P4-programmable devices")

Signed

ethdev: fix flow program action description

"program" action should also be added in structure rte_flow_desc_action.

Fixes: 8f1953f1914d ("ethdev: add flow API for P4-programmable devices")

Signed-off-by: Wenjing Qiao <wenjing.qiao@intel.com>
Acked-by: Ori Kam <orika@nvidia.com>

show more ...


Revision tags: v23.11-rc1
# a5ea57ac 17-Oct-2023 Suanming Mou <suanmingm@nvidia.com>

ethdev: add check in async flow action query

This commit adds the ops check to fix the coverity issue.

Coverity issue: 403258
Fixes: c9dc03840873 ("ethdev: add indirect action async query")
Cc: sta

ethdev: add check in async flow action query

This commit adds the ops check to fix the coverity issue.

Coverity issue: 403258
Fixes: c9dc03840873 ("ethdev: add indirect action async query")
Cc: stable@dpdk.org

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>

show more ...


# ffe18b05 10-Oct-2023 Ori Kam <orika@nvidia.com>

ethdev: add calculate hash function

rte_flow supports insert by index table, see
commit 60261a005dff ("ethdev: add flow template table insertion type").

Using the above table, the application can c

ethdev: add calculate hash function

rte_flow supports insert by index table, see
commit 60261a005dff ("ethdev: add flow template table insertion type").

Using the above table, the application can create rules
that are based on hash.
For example application can create the following logic in order
to create load balancing:
1. Create insert by index table with 2 rules, that hashes based on dmac
2. Insert to index 0 a rule that sends the traffic to port A.
3. Insert to index 1 a rule that sends the traffic to port B.

Let's also assume that before this table, there is a 5 tuple
match table that jumps to the above table.

So each packet that matches one of the 5 tuple rules is RSSed
to port A or B, based on dmac hash.

The issue arises when there is a miss on the 5 tuple table,
which resulted due to the packet being the first packet of this flow, or
fragmented packet or any other reason.
In this case, the application must calculate what would be the
hash calculated by the HW so it can send the packet to the correct
port.

This new API allows applications to calculate the hash value of a given
packet for a given table.

Signed-off-by: Ori Kam <orika@nvidia.com>

show more ...


# a3d2c697 09-Oct-2023 Alexander Kozyrev <akozyrev@nvidia.com>

ethdev: add packet type matching item

Add RTE_FLOW_ITEM_TYPE_PTYPE to allow matching on
L2/L3/L4 and tunnel information as defined in mbuf.

To match on RTE_PTYPE_L4_TCP and RTE_PTYPE_INNER_L4_UDP:

ethdev: add packet type matching item

Add RTE_FLOW_ITEM_TYPE_PTYPE to allow matching on
L2/L3/L4 and tunnel information as defined in mbuf.

To match on RTE_PTYPE_L4_TCP and RTE_PTYPE_INNER_L4_UDP:
flow pattern_template 0 create pattern_template_id 1
ingress template ptype packet_type mask 0x0f000f00 / end
flow queue 0 create 0 template_table 1
pattern_template 0 actions_template 0
pattern ptype packet_type is 0x02000100 / end
actions queue index 1 / end

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

show more ...


# 8a26a658 20-Sep-2023 Tomer Shmilovich <tshmilovich@nvidia.com>

ethdev: set flow group miss actions

Introduce new group set miss actions API:
rte_flow_group_set_miss_actions().

A group's miss actions are a set of actions to be performed
in case of a miss on a g

ethdev: set flow group miss actions

Introduce new group set miss actions API:
rte_flow_group_set_miss_actions().

A group's miss actions are a set of actions to be performed
in case of a miss on a group, meaning a packet didn't hit any rules
in the group. This API function allows a user to set a group's
miss actions.

Add testpmd CLI interface for the group set miss actions API:

flow group 0 group_id 1 ingress set_miss_actions jump group 3 / end
flow group 0 group_id 1 ingress set_miss_actions end

Signed-off-by: Tomer Shmilovich <tshmilovich@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>

show more ...


# 2744cb6e 13-Sep-2023 Thomas Monjalon <thomas@monjalon.net>

lib: remove pthread.h from includes

The header files should have the minimum embedded includes.
The file pthread.h can logically be removed from
rte_per_lcore.h and rte_ethdev_core.h files.

Signed-

lib: remove pthread.h from includes

The header files should have the minimum embedded includes.
The file pthread.h can logically be removed from
rte_per_lcore.h and rte_ethdev_core.h files.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>

show more ...


Revision tags: v23.07, v23.07-rc4, v23.07-rc3, v23.07-rc2
# fca8cba4 21-Jun-2023 David Marchand <david.marchand@redhat.com>

ethdev: advertise flow restore in mbuf

As reported by Ilya [1], unconditionally calling
rte_flow_get_restore_info() impacts an application performance for drivers
that do not provide this ops.
It co

ethdev: advertise flow restore in mbuf

As reported by Ilya [1], unconditionally calling
rte_flow_get_restore_info() impacts an application performance for drivers
that do not provide this ops.
It could also impact processing of packets that require no call to
rte_flow_get_restore_info() at all.

Register a dynamic mbuf flag when an application negotiates tunnel
metadata delivery (calling rte_eth_rx_metadata_negotiate() with
RTE_ETH_RX_METADATA_TUNNEL_ID).

Drivers then advertise that metadata can be extracted by setting this
dynamic flag in each mbuf.

The application then calls rte_flow_get_restore_info() only when required.

Link: http://inbox.dpdk.org/dev/5248c2ca-f2a6-3fb0-38b8-7f659bfa40de@ovn.org/

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>

show more ...


Revision tags: v23.07-rc1
# fad1e8f5 24-May-2023 Rongwei Liu <rongweil@nvidia.com>

ethdev: add IPv6 extension push/remove flow actions

Add new rte_actions to push and remove the specific
type of IPv6 extension to and from original packets.

A new extension to be pushed should be t

ethdev: add IPv6 extension push/remove flow actions

Add new rte_actions to push and remove the specific
type of IPv6 extension to and from original packets.

A new extension to be pushed should be the last extension
due to the next header awareness.

Remove can support the IPv6 extension in any position.

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

show more ...


# fb131e29 26-May-2023 Suanming Mou <suanmingm@nvidia.com>

ethdev: fix indirect action conversion

As indirect action conf fills the indirect action handler, while
converting indirect action, the action conf(action handler) should
be copied from original ind

ethdev: fix indirect action conversion

As indirect action conf fills the indirect action handler, while
converting indirect action, the action conf(action handler) should
be copied from original indirect action conf instead of duplicating
the action handler memory.

Fixes: 4b61b8774be9 ("ethdev: introduce indirect flow action")
Cc: stable@dpdk.org

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>

show more ...


123