| #
295968d1 |
| 22-Oct-2021 |
Ferruh Yigit <ferruh.yigit@intel.com> |
ethdev: add namespace
Add 'RTE_ETH' namespace to all enums & macros in a backward compatible way. The macros for backward compatibility can be removed in next LTS. Also updated some struct names to
ethdev: add namespace
Add 'RTE_ETH' namespace to all enums & macros in a backward compatible way. The macros for backward compatibility can be removed in next LTS. Also updated some struct names to have 'rte_eth' prefix.
All internal components switched to using new names.
Syntax fixed on lines that this patch touches.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Wisam Jaddo <wisamm@nvidia.com> Acked-by: Rosen Xu <rosen.xu@intel.com> Acked-by: Chenbo Xia <chenbo.xia@intel.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
show more ...
|
| #
3a929df1 |
| 21-Oct-2021 |
Jie Wang <jie1x.wang@intel.com> |
ethdev: support L2TPv2 and PPP procotol
Added flow pattern items and header formats of L2TPv2 and PPP.
Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com> Signed-off-by: Jie Wang <jie1x.wang@intel.com>
ethdev: support L2TPv2 and PPP procotol
Added flow pattern items and header formats of L2TPv2 and PPP.
Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com> Signed-off-by: Jie Wang <jie1x.wang@intel.com> Acked-by: Ori Kam <orika@nvidia.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
| #
5906be5a |
| 20-Oct-2021 |
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> |
ethdev: fix ID spelling in comments and log messages
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Ori Kam <orika@nvidia.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@inte
ethdev: fix ID spelling in comments and log messages
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Ori Kam <orika@nvidia.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
| #
5b49ba65 |
| 20-Oct-2021 |
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> |
ethdev: fix VLAN spelling including VLAN ID case
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Ori Kam <orika@nvidia.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.co
ethdev: fix VLAN spelling including VLAN ID case
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Ori Kam <orika@nvidia.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
| #
3c2ca0a9 |
| 20-Oct-2021 |
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> |
ethdev: avoid documentation in next lines
Documentation in the next separate line is confusing. If documentation requires own line it should be before, not after.
Move documentation to the previous
ethdev: avoid documentation in next lines
Documentation in the next separate line is confusing. If documentation requires own line it should be before, not after.
Move documentation to the previous line if documentation on the same line makes it too long.
Fix a number of incorrect markups on the way.
When a lines is touched by the patch anyway, do other cosmetics changes to avoid changes in next patches.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Ori Kam <orika@nvidia.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
| #
e1823e08 |
| 20-Oct-2021 |
Thomas Monjalon <thomas@monjalon.net> |
ethdev: replace bit shifts with macros
The macros RTE_BIT32 and RTE_BIT64 are used to replace bit shifts. The macro UINT64C is also used to replace remaining occurrences of ULL.
The bit shifts of E
ethdev: replace bit shifts with macros
The macros RTE_BIT32 and RTE_BIT64 are used to replace bit shifts. The macro UINT64C is also used to replace remaining occurrences of ULL.
The bit shifts of ETH_RSS_LEVEL_* are kept for aesthetic reason.
The API of rte_mtr and rte_tm is using enums for 64-bit variables. As they are enums, unsigned bit cannot be used.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
show more ...
|
| #
dc4d860e |
| 20-Oct-2021 |
Viacheslav Ovsiienko <viacheslavo@nvidia.com> |
ethdev: introduce configurable flexible item
1. Introduction and Retrospective
Nowadays the networks are evolving fast and wide, the network structures are getting more and more complicated, the ne
ethdev: introduce configurable flexible item
1. Introduction and Retrospective
Nowadays the networks are evolving fast and wide, the network structures are getting more and more complicated, the new application areas are emerging. To address these challenges the new network protocols are continuously being developed, considered by technical communities, adopted by industry and, eventually implemented in hardware and software. The DPDK framework follows the common trends and if we bother to glance at the RTE Flow API header we see the multiple new items were introduced during the last years since the initial release.
The new protocol adoption and implementation process is not straightforward and takes time, the new protocol passes development, consideration, adoption, and implementation phases. The industry tries to mitigate and address the forthcoming network protocols, for example, many hardware vendors are implementing flexible and configurable network protocol parsers. As DPDK developers, could we anticipate the near future in the same fashion and introduce the similar flexibility in RTE Flow API?
Let's check what we already have merged in our project, and we see the nice raw item (rte_flow_item_raw). At the first glance, it looks superior and we can try to implement a flow matching on the header of some relatively new tunnel protocol, say on the GENEVE header with variable length options. And, under further consideration, we run into the raw item limitations:
- only fixed size network header can be represented - the entire network header pattern of fixed format (header field offsets are fixed) must be provided - the search for patterns is not robust (the wrong matches might be triggered), and actually is not supported by existing PMDs - no explicitly specified relations with preceding and following items - no tunnel hint support
As the result, implementing the support for tunnel protocols like aforementioned GENEVE with variable extra protocol option with flow raw item becomes very complicated and would require multiple flows and multiple raw items chained in the same flow (by the way, there is no support found for chained raw items in implemented drivers).
This RFC introduces the dedicated flex item (rte_flow_item_flex) to handle matches with existing and new network protocol headers in a unified fashion.
2. Flex Item Life Cycle
Let's assume there are the requirements to support the new network protocol with RTE Flows. What is given within protocol specification:
- header format - header length, (can be variable, depending on options) - potential presence of extra options following or included in the header the header - the relations with preceding protocols. For example, the GENEVE follows UDP, eCPRI can follow either UDP or L2 header - the relations with following protocols. For example, the next layer after tunnel header can be L2 or L3 - whether the new protocol is a tunnel and the header is a splitting point between outer and inner layers
The supposed way to operate with flex item:
- application defines the header structures according to protocol specification
- application calls rte_flow_flex_item_create() with desired configuration according to the protocol specification, it creates the flex item object over specified ethernet device and prepares PMD and underlying hardware to handle flex item. On item creation call PMD backing the specified ethernet device returns the opaque handle identifying the object has been created
- application uses the rte_flow_item_flex with obtained handle in the flows, the values/masks to match with fields in the header are specified in the flex item per flow as for regular items (except that pattern buffer combines all fields)
- flows with flex items match with packets in a regular fashion, the values and masks for the new protocol header match are taken from the flex items in the flows
- application destroys flows with flex items
- application calls rte_flow_flex_item_release() as part of ethernet device API and destroys the flex item object in PMD and releases the engaged hardware resources
3. Flex Item Structure
The flex item structure is intended to be used as part of the flow pattern like regular RTE flow items and provides the mask and value to match with fields of the protocol item was configured for.
struct rte_flow_item_flex { void *handle; uint32_t length; const uint8_t* pattern; };
The handle is some opaque object maintained on per device basis by underlying driver.
The protocol header fields are considered as bit fields, all offsets and widths are expressed in bits. The pattern is the buffer containing the bit concatenation of all the fields presented at item configuration time, in the same order and same amount. If byte boundary alignment is needed an application can use a dummy type field, this is just some kind of gap filler.
The length field specifies the pattern buffer length in bytes and is needed to allow rte_flow_copy() operations. The approach of multiple pattern pointers and lengths (per field) was considered and found clumsy - it seems to be much suitable for the application to maintain the single structure within the single pattern buffer.
4. Flex Item Configuration
The flex item configuration consists of the following parts:
- header field descriptors: - next header - next protocol - sample to match - input link descriptors - output link descriptors
The field descriptors tell the driver and hardware what data should be extracted from the packet and then control the packet handling in the flow engine. Besides this, sample fields can be presented to match with patterns in the flows. Each field is a bit pattern. It has width, offset from the header beginning, mode of offset calculation, and offset related parameters.
The next header field is special, no data are actually taken from the packet, but its offset is used as a pointer to the next header in the packet, in other words the next header offset specifies the size of the header being parsed by flex item.
There is one more special field - next protocol, it specifies where the next protocol identifier is contained and packet data sampled from this field will be used to determine the next protocol header type to continue packet parsing. The next protocol field is like eth_type field in MAC2, or proto field in IPv4/v6 headers.
The sample fields are used to represent the data be sampled from the packet and then matched with established flows.
There are several methods supposed to calculate field offset in runtime depending on configuration and packet content:
- FIELD_MODE_FIXED - fixed offset. The bit offset from header beginning is permanent and defined by field_base configuration parameter.
- FIELD_MODE_OFFSET - the field bit offset is extracted from other header field (indirect offset field). The resulting field offset to match is calculated from as:
field_base + (*offset_base & offset_mask) << offset_shift
This mode is useful to sample some extra options following the main header with field containing main header length. Also, this mode can be used to calculate offset to the next protocol header, for example - IPv4 header contains the 4-bit field with IPv4 header length expressed in dwords. One more example - this mode would allow us to skip GENEVE header variable length options.
- FIELD_MODE_BITMASK - the field bit offset is extracted from other header field (indirect offset field), the latter is considered as bitmask containing some number of one bits, the resulting field offset to match is calculated as:
field_base + bitcount(*offset_base & offset_mask) << offset_shift
This mode would be useful to skip the GTP header and its extra options with specified flags.
- FIELD_MODE_DUMMY - dummy field, optionally used for byte boundary alignment in pattern. Pattern mask and data are ignored in the match. All configuration parameters besides field size and offset are ignored.
Note: "*" - means the indirect field offset is calculated and actual data are extracted from the packet by this offset (like data are fetched by pointer *p from memory).
The offset mode list can be extended by vendors according to hardware supported options.
The input link configuration section tells the driver after what protocols and at what conditions the flex item can follow. Input link specified the preceding header pattern, for example for GENEVE it can be UDP item specifying match on destination port with value 6081. The flex item can follow multiple header types and multiple input links should be specified. At flow creation time the item with one of the input link types should precede the flex item and driver will select the correct flex item settings, depending on the actual flow pattern.
The output link configuration section tells the driver how to continue packet parsing after the flex item protocol. If multiple protocols can follow the flex item header the flex item should contain the field with the next protocol identifier and the parsing will be continued depending on the data contained in this field in the actual packet.
The flex item fields can participate in RSS hash calculation, the dedicated flag is present in the field description to specify what fields should be provided for hashing.
5. Flex Item Chaining
If there are multiple protocols supposed to be supported with flex items in chained fashion - two or more flex items within the same flow and these ones might be neighbors in the pattern, it means the flex items are mutual referencing. In this case, the item that occurred first should be created with empty output link list or with the list including existing items, and then the second flex item should be created referencing the first flex item as input arc, drivers should adjust the item configuration.
Also, the hardware resources used by flex items to handle the packet can be limited. If there are multiple flex items that are supposed to be used within the same flow it would be nice to provide some hint for the driver that these two or more flex items are intended for simultaneous usage. The fields of items should be assigned with hint indices and these indices from two or more flex items supposed to be provided within the same flow should be the same as well. In other words, the field hint index specifies the group of fields that can be matched simultaneously within a single flow. If hint indices are specified, the driver will try to engage not overlapping hardware resources and provide independent handling of the field groups with unique indices. If the hint index is zero the driver assigns resources on its own.
6. Example of New Protocol Handling
Let's suppose we have the requirements to handle the new tunnel protocol that follows UDP header with destination port 0xFADE and is followed by MAC header. Let the new protocol header format be like this:
struct new_protocol_header { rte_be32 header_length; /* length in dwords, including options */ rte_be32 specific0; /* some protocol data, no intention */ rte_be32 specific1; /* to match in flows on these fields */ rte_be32 crucial; /* data of interest, match is needed */ rte_be32 options[0]; /* optional protocol data, variable length */ };
The supposed flex item configuration:
struct rte_flow_item_flex_field field0 = { .field_mode = FIELD_MODE_DUMMY, /* Affects match pattern only */ .field_size = 96, /* three dwords from the beginning */ }; struct rte_flow_item_flex_field field1 = { .field_mode = FIELD_MODE_FIXED, .field_size = 32, /* Field size is one dword */ .field_base = 96, /* Skip three dwords from the beginning */ }; struct rte_flow_item_udp spec0 = { .hdr = { .dst_port = RTE_BE16(0xFADE), } }; struct rte_flow_item_udp mask0 = { .hdr = { .dst_port = RTE_BE16(0xFFFF), } }; struct rte_flow_item_flex_link link0 = { .item = { .type = RTE_FLOW_ITEM_TYPE_UDP, .spec = &spec0, .mask = &mask0, };
struct rte_flow_item_flex_conf conf = { .next_header = { .tunnel = FLEX_TUNNEL_MODE_SINGLE, .field_mode = FIELD_MODE_OFFSET, .field_base = 0, .offset_base = 0, .offset_mask = 0xFFFFFFFF, .offset_shift = 2 /* Expressed in dwords, shift left by 2 */ }, .sample = { &field0, &field1, }, .nb_samples = 2, .input_link[0] = &link0, .nb_inputs = 1 };
Let's suppose we have created the flex item successfully, and PMD returned the handle 0x123456789A. We can use the following item pattern to match the crucial field in the packet with value 0x00112233:
struct new_protocol_header spec_pattern = { .crucial = RTE_BE32(0x00112233), }; struct new_protocol_header mask_pattern = { .crucial = RTE_BE32(0xFFFFFFFF), }; struct rte_flow_item_flex spec_flex = { .handle = 0x123456789A .length = sizeiof(struct new_protocol_header), .pattern = &spec_pattern, }; struct rte_flow_item_flex mask_flex = { .length = sizeof(struct new_protocol_header), .pattern = &mask_pattern, }; struct rte_flow_item item_to_match = { .type = RTE_FLOW_ITEM_TYPE_FLEX, .spec = &spec_flex, .mask = &mask_flex, };
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> Acked-by: Ori Kam <orika@nvidia.com>
show more ...
|
| #
50cd0391 |
| 13-Oct-2021 |
Viacheslav Ovsiienko <viacheslavo@nvidia.com> |
ethdev: add experimental comment for modify field action
EXPERIMENTAL tag was missed in rte_flow_action_modify_data structure description.
Fixes: 73b68f4c54a0 ("ethdev: introduce generic modify flo
ethdev: add experimental comment for modify field action
EXPERIMENTAL tag was missed in rte_flow_action_modify_data structure description.
Fixes: 73b68f4c54a0 ("ethdev: introduce generic modify flow action") Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> Acked-by: Ori Kam <orika@nvidia.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
show more ...
|
| #
14fc81ae |
| 13-Oct-2021 |
Viacheslav Ovsiienko <viacheslavo@nvidia.com> |
ethdev: update modify field flow action
The generic modify field flow action introduced in [1] has some issues related to the immediate source operand:
- immediate source can be presented either
ethdev: update modify field flow action
The generic modify field flow action introduced in [1] has some issues related to the immediate source operand:
- immediate source can be presented either as an unsigned 64-bit integer or pointer to data pattern in memory. There was no explicit pointer field defined in the union.
- the byte ordering for 64-bit integer was not specified. Many fields have shorter lengths and byte ordering is crucial.
- how the bit offset is applied to the immediate source field was not defined and documented.
- 64-bit integer size is not enough to provide IPv6 addresses.
In order to cover the issues and exclude any ambiguities the following is done:
- introduce the explicit pointer field in rte_flow_action_modify_data structure
- replace the 64-bit unsigned integer with 16-byte array
- update the modify field flow action documentation
Appropriate deprecation notice has been removed.
[1] commit 73b68f4c54a0 ("ethdev: introduce generic modify flow action")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> Acked-by: Ori Kam <orika@nvidia.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
show more ...
|
| #
1179f05c |
| 14-Oct-2021 |
Ivan Malov <ivan.malov@oktetlabs.ru> |
ethdev: query proxy port to manage transfer flows
Not all DPDK ports in a given switching domain may have the privilege to manage "transfer" flows. Add an API to find a port with sufficient privileg
ethdev: query proxy port to manage transfer flows
Not all DPDK ports in a given switching domain may have the 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> Acked-by: Ori Kam <orika@nvidia.com>
show more ...
|
| #
9d2a349b |
| 13-Oct-2021 |
Ivan Malov <ivan.malov@oktetlabs.ru> |
ethdev: deprecate direction attributes in transfer flows
Attributes "ingress" and "egress" can only apply unambiguosly to non-"transfer" flows. In "transfer" flows, the standpoint is effectively shi
ethdev: deprecate direction attributes in transfer flows
Attributes "ingress" and "egress" can only apply unambiguosly to non-"transfer" flows. In "transfer" flows, the standpoint is effectively shifted to the embedded switch. There can be many different endpoints connected to the switch, so the use of "ingress" / "egress" does not shed light on which endpoints precisely can be considered as traffic sources.
Add relevant deprecation notices and suggest the use of precise traffic source items (PORT_REPRESENTOR and REPRESENTED_PORT).
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Acked-by: Ori Kam <orika@nvidia.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
| #
5da44faa |
| 13-Oct-2021 |
Ivan Malov <ivan.malov@oktetlabs.ru> |
ethdev: deprecate hard-to-use or ambiguous items and actions
PF, VF and PHY_PORT require that applications have extra knowledge of the underlying NIC and thus are hard to use. Also, the correspondin
ethdev: deprecate hard-to-use or ambiguous items and actions
PF, VF and PHY_PORT require that applications have extra knowledge of the underlying NIC and thus are hard to use. Also, the corresponding items depend on the direction attribute (ingress / egress), which complicates their use in applications and interpretation in PMDs.
The concept of PORT_ID is ambiguous as it doesn't say whether the port in question is an ethdev or the represented entity.
Items and actions PORT_REPRESENTOR, REPRESENTED_PORT should be used instead.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Acked-by: Ori Kam <orika@nvidia.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
show more ...
|
| #
88caad25 |
| 13-Oct-2021 |
Ivan Malov <ivan.malov@oktetlabs.ru> |
ethdev: add represented port action to flow API
For use in "transfer" flows. Supposed to send matching traffic to the entity represented by the given ethdev, at embedded switch level. Such an entity
ethdev: add represented port action to flow API
For use in "transfer" flows. Supposed to send matching traffic to the entity represented by the given ethdev, at embedded switch level. Such an entity can be a network (via a network port), a guest machine (via a VF) or another ethdev in the same application.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Acked-by: Ori Kam <orika@nvidia.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
show more ...
|
| #
8edb6bc0 |
| 13-Oct-2021 |
Ivan Malov <ivan.malov@oktetlabs.ru> |
ethdev: add port representor action to flow API
For use in "transfer" flows. Supposed to send matching traffic to the given ethdev (to the application), at embedded switch level.
Signed-off-by: Iva
ethdev: add port representor action to flow API
For use in "transfer" flows. Supposed to send matching traffic to the given ethdev (to the application), at embedded switch level.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Acked-by: Ori Kam <orika@nvidia.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
show more ...
|
| #
49863ae2 |
| 13-Oct-2021 |
Ivan Malov <ivan.malov@oktetlabs.ru> |
ethdev: add represented port item to flow API
For use in "transfer" flows. Supposed to match traffic entering the embedded switch from the entity represented by the given ethdev. Such an entity can
ethdev: add represented port item to flow API
For use in "transfer" flows. Supposed to match traffic entering the embedded switch from the entity represented by the given ethdev. Such an entity can be a network (via a network port), a guest machine (via a VF) or another ethdev in the same application.
Must not be combined with direction attributes.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Acked-by: Ori Kam <orika@nvidia.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
show more ...
|
| #
081e42da |
| 13-Oct-2021 |
Ivan Malov <ivan.malov@oktetlabs.ru> |
ethdev: add port representor item to flow API
For use in "transfer" flows. Supposed to match traffic entering the embedded switch from the given ethdev.
Must not be combined with direction attribut
ethdev: add port representor item to flow API
For use in "transfer" flows. Supposed to match traffic entering the embedded switch from the given ethdev.
Must not be combined with direction attributes.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Acked-by: Ori Kam <orika@nvidia.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
show more ...
|
| #
f6d8a6d3 |
| 12-Oct-2021 |
Ivan Malov <ivan.malov@oktetlabs.ru> |
ethdev: negotiate delivery of packet metadata from HW to PMD
Provide an API to let the application control the NIC's ability to deliver specific kinds of per-packet metadata to the PMD.
Checks for
ethdev: negotiate delivery of packet metadata from HW to PMD
Provide an API to let the application control the NIC's ability to deliver specific kinds of per-packet metadata to the PMD.
Checks for the NIC's ability to set these kinds of metadata in the first place (support for the flow actions) belong in flow API responsibility domain (flow validate mechanism). This topic is out of scope of the new API in question.
The PMD's ability to deliver received metadata to the user by virtue of mbuf fields should be covered by mbuf library. It is also out of scope of the new API in question.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Reviewed-by: Andy Moreton <amoreton@xilinx.com> Acked-by: Ray Kinsella <mdr@ashroe.eu> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Somnath Kotur <somnath.kotur@broadcom.com> Acked-by: Ori Kam <orika@nvidia.com> Acked-by: Wisam Jaddo <wisamm@nvidia.com>
show more ...
|
| #
92ef4b8f |
| 08-Oct-2021 |
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> |
ethdev: remove deprecated shared counter attribute
Indirect actions should be used to do shared counters.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Thomas Monjalon <
ethdev: remove deprecated shared counter attribute
Indirect actions should be used to do shared counters.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Somnath Kotur <somnath.kotur@broadcom.com> Acked-by: Ori Kam <orika@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
| #
04d43857 |
| 07-Oct-2021 |
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> |
net: rename Ethernet header fields
Definition of `rte_ether_addr` structure used a workaround allowing DPDK and Windows SDK headers to be used in the same file, because Windows SDK defines `s_addr`
net: rename Ethernet header fields
Definition of `rte_ether_addr` structure used a workaround allowing DPDK and Windows SDK headers to be used in the same file, because Windows SDK defines `s_addr` as a macro. Rename `s_addr` to `src_addr` and `d_addr` to `dst_addr` to avoid the conflict and remove the workaround. Deprecation notice: https://mails.dpdk.org/archives/dev/2021-July/215270.html
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
show more ...
|
| #
16b8e92d |
| 23-Aug-2021 |
Raslan Darawsheh <rasland@nvidia.com> |
ethdev: use extension header for GTP PSC item
This updates the gtp_psc flow item to use the net header definition of the gtp_psc to be based on RFC 38415-g30
Signed-off-by: Raslan Darawsheh <raslan
ethdev: use extension header for GTP PSC item
This updates the gtp_psc flow item to use the net header definition of the gtp_psc to be based on RFC 38415-g30
Signed-off-by: Raslan Darawsheh <rasland@nvidia.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
|
Revision tags: v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2, v21.08-rc1 |
|
| #
56912dde |
| 23-Jun-2021 |
Jan Viktorin <viktorin@cesnet.cz> |
ethdev: fix doc of flow action
The struct rte_flow_action was missing from DPDK API documentation.
Fixes: 3850cf0c8c37 ("ethdev: add tunnel encap/decap actions") Cc: stable@dpdk.org
Signed-off-by:
ethdev: fix doc of flow action
The struct rte_flow_action was missing from DPDK API documentation.
Fixes: 3850cf0c8c37 ("ethdev: add tunnel encap/decap actions") Cc: stable@dpdk.org
Signed-off-by: Jan Viktorin <viktorin@cesnet.cz> Acked-by: Ori Kam <orika@nvidia.com> Acked-by: Aman Deep Singh <aman.deep.singh@intel.com>
show more ...
|
|
Revision tags: v21.05, v21.05-rc4 |
|
| #
0d025f01 |
| 19-May-2021 |
Thomas Monjalon <thomas@monjalon.net> |
ethdev: fix comments of packet integrity flow item
The Doxygen comments are placed before the related lines, but the markers were /**< instead of /**
The struct rte_flow_item_integrity did not appe
ethdev: fix comments of packet integrity flow item
The Doxygen comments are placed before the related lines, but the markers were /**< instead of /**
The struct rte_flow_item_integrity did not appear in Doxygen output because there was no general comment for the struct.
Fixes: b10a421a1f3b ("ethdev: add packet integrity check flow rules")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
show more ...
|
|
Revision tags: v21.05-rc3, v21.05-rc2, v21.05-rc1 |
|
| #
5f0d54f3 |
| 20-Apr-2021 |
Li Zhang <lizh@nvidia.com> |
ethdev: add pre-defined meter policy API
Currently, the flow meter policy does not support multiple actions per color; also the allowed action types per color are very limited. In addition, the poli
ethdev: add pre-defined meter policy API
Currently, the flow meter policy does not support multiple actions per color; also the allowed action types per color are very limited. In addition, the policy cannot be pre-defined.
Due to the growing in flow actions offload abilities there is a potential for the user to use variety of actions per color differently. This new meter policy API comes to allow this potential in the most ethdev common way using rte_flow action definition. A list of rte_flow actions will be provided by the user per color in order to create a meter policy. In addition, the API forces to pre-define the policy before the meters creation in order to allow sharing of single policy with multiple meters efficiently.
meter_policy_id is added into struct rte_mtr_params. So that it can get the policy during the meters creation.
Allow coloring the packet using a new rte_flow_action_color as could be done by the old policy API.
Add two common policy template as macros in the head file.
The next API function were added: - rte_mtr_meter_policy_add - rte_mtr_meter_policy_delete - rte_mtr_meter_policy_update - rte_mtr_meter_policy_validate The next struct was changed: - rte_mtr_params - rte_mtr_capabilities The next API was deleted: - rte_mtr_policer_actions_update
To support this API the following app were changed: app/test-flow-perf: clean meter policer app/testpmd: clean meter policer
To support this API the following drivers were changed: net/softnic: support meter policy API 1. Cleans meter rte_mtr_policer_action. 2. Supports policy API to get color action as policer action did. The color action will be mapped into rte_table_action_policer.
net/mlx5: clean meter creation management Cleans and breaks part of the current meter management in order to allow better design with policy API.
Signed-off-by: Li Zhang <lizh@nvidia.com> Signed-off-by: Haifei Luo <haifeil@nvidia.com> Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com> Acked-by: Ray Kinsella <mdr@ashroe.eu> Acked-by: Ori Kam <orika@nvidia.com> Acked-by: Jasvinder Singh <jasvinder.singh@intel.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
show more ...
|
| #
9847fd12 |
| 19-Apr-2021 |
Bing Zhao <bingz@nvidia.com> |
ethdev: introduce conntrack flow action and item
This commit introduces the conntrack action and item.
Usually the HW offloading is stateless. For some stateful offloading like a TCP connection, HW
ethdev: introduce conntrack flow action and item
This commit introduces the conntrack action and item.
Usually the HW offloading is stateless. For some stateful offloading like a TCP connection, HW module will help provide the ability of a full offloading w/o SW participation after the connection was established.
The basic usage is that in the first flow rule the application should add the conntrack action and jump to the next flow table. In the following flow rule(s) of the next table, the application should use the conntrack item to match on the result.
A TCP connection has two directions traffic. To set a conntrack action context correctly, the information of packets from both directions are required.
The conntrack action should be created on one ethdev port and supply the peer ethdev port as a parameter to the action. After context created, it could only be used between these two ethdev ports (dual-port mode) or a single port. The application should modify the action via the API "rte_action_handle_update" only when before using it to create a flow rule with conntrack for the opposite direction. This will help the driver to recognize the direction of the flow to be created, especially in the single-port mode, in which case the traffic from both directions will go through the same ethdev port if the application works as an "forwarding engine" but not an end point. There is no need to call the update interface if the subsequent flow rules have nothing to be changed.
Query will be supported via "rte_action_handle_query" interface, about the current packets information and connection status. The fields query capabilities depends on the HW.
For the packets received during the conntrack setup, it is suggested to re-inject the packets in order to make sure the conntrack module works correctly without missing any packet. Only the valid packets should pass the conntrack, packets with invalid TCP information, like out of window, or with invalid header, like malformed, should not pass.
Naming and definition: https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/ netfilter/nf_conntrack_tcp.h https://elixir.bootlin.com/linux/latest/source/net/netfilter/ nf_conntrack_proto_tcp.c
Other reference: https://www.usenix.org/legacy/events/sec01/invitedtalks/rooij.pdf
Signed-off-by: Bing Zhao <bingz@nvidia.com> Acked-by: Ori Kam <orika@nvidia.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
show more ...
|
| #
b10a421a |
| 19-Apr-2021 |
Ori Kam <orika@nvidia.com> |
ethdev: add packet integrity check flow rules
Currently, DPDK application can offload the checksum check, and report it in the mbuf.
However, as more and more applications are offloading some or al
ethdev: add packet integrity check flow rules
Currently, DPDK application can offload the checksum check, and report it in the mbuf.
However, as more and more applications are offloading some or all logic and action to the HW, there is a need to check the packet integrity so the right decision can be taken.
The application logic can be positive meaning if the packet is valid jump / do actions, or negative if packet is not valid jump to SW / do actions (like drop) and add default flow (match all in low priority) that will direct the miss packet to the miss path.
Since currently rte_flow works in positive way the assumption is that the positive way will be the common way in this case also.
When thinking what is the best API to implement such feature, we need to consider the following (in no specific order): 1. API breakage. 2. Simplicity. 3. Performance. 4. HW capabilities. 5. rte_flow limitation. 6. Flexibility.
First option: Add integrity flags to each of the items. For example add checksum_ok to IPv4 item.
Pros: 1. No new rte_flow item. 2. Simple in the way that on each item the app can see what checks are available.
Cons: 1. API breakage. 2. Increase number of flows, since app can't add global rule and must have dedicated flow for each of the flow combinations, for example matching on ICMP traffic or UDP/TCP traffic with IPv4 / IPv6 will result in 5 flows.
Second option: dedicated item
Pros: 1. No API breakage, and there will be no for some time due to having extra space. (by using bits) 2. Just one flow to support the ICMP or UDP/TCP traffic with IPv4 / IPv6. 3. Simplicity application can just look at one place to see all possible checks. 4. Allow future support for more tests.
Cons: 1. New item, that holds number of fields from different items.
For starter the following bits are suggested: 1. packet_ok - means that all HW checks depending on packet layer have passed. This may mean that in some HW such flow should be split to number of flows or fail. 2. l2_ok - all check for layer 2 have passed. 3. l3_ok - all check for layer 3 have passed. If packet doesn't have L3 layer this check should fail. 4. l4_ok - all check for layer 4 have passed. If packet doesn't have L4 layer this check should fail. 5. l2_crc_ok - the layer 2 CRC is O.K. 6. ipv4_csum_ok - IPv4 checksum is O.K. It is possible that the IPv4 checksum will be O.K. but the l3_ok will be 0. It is not possible that checksum will be 0 and the l3_ok will be 1. 7. l4_csum_ok - layer 4 checksum is O.K. 8. l3_len_OK - check that the reported layer 3 length is smaller than the frame length.
Example of usage: 1. Check packets from all possible layers for integrity. flow create integrity spec packet_ok = 1 mask packet_ok = 1 .....
2. Check only packet with layer 4 (UDP / TCP) flow create integrity spec l3_ok = 1, l4_ok = 1 mask l3_ok = 1 l4_ok = 1
Signed-off-by: Ori Kam <orika@nvidia.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
show more ...
|