Commit Graph

195 Commits

Author SHA1 Message Date
Yuan Wang
605975b8b3 ethdev: introduce protocol-based buffer split
Currently, Rx buffer split supports length based split. With Rx queue
offload RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT enabled and Rx packet segment
configured, PMD will be able to split the received packets into
multiple segments.

However, length based buffer split is not suitable for NICs that do split
based on protocol headers. Given an arbitrarily variable length in Rx
packet segment, it is almost impossible to pass a fixed protocol header to
driver. Besides, the existence of tunneling results in the composition of
a packet is various, which makes the situation even worse.

This patch extends current buffer split to support protocol header based
buffer split. A new proto_hdr field is introduced in the reserved field
of rte_eth_rxseg_split structure to specify protocol header. The proto_hdr
field defines the split position of packet, splitting will always happen
after the protocol header defined in the Rx packet segment. When Rx queue
offload RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT is enabled and corresponding
protocol header is configured, driver will split the ingress packets into
multiple segments.

Examples for proto_hdr field defines:
To split after ETH-IPV4-UDP, it should be defined as
proto_hdr = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
            RTE_PTYPE_L4_UDP

For inner ETH-IPV4-UDP, it should be defined as
proto_hdr = RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
            RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_INNER_L4_UDP

If the protocol header is repeated with the previously defined one,
the repeated part should be omitted. For example, split after ETH, ETH-IPV4
and ETH-IPV4-UDP, it should be defined as
proto_hdr0 = RTE_PTYPE_L2_ETHER
proto_hdr1 = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN
proto_hdr2 = RTE_PTYPE_L4_UDP

If protocol header split can be supported by a PMD, the
rte_eth_buffer_split_get_supported_hdr_ptypes function can
be used to obtain a list of these protocol headers.

For example, let's suppose we configured the Rx queue with the
following segments:
        seg0 - pool0, proto_hdr0=RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4,
               off0=2B
        seg1 - pool1, proto_hdr1=RTE_PTYPE_L4_UDP, off1=128B
        seg2 - pool2, proto_hdr2=0, off1=0B

The packet consists of ETH_IPV4_UDP_PAYLOAD will be split like
following:
        seg0 - ipv4 header @ RTE_PKTMBUF_HEADROOM + 2 in mbuf from pool0
        seg1 - udp header @ 128 in mbuf from pool1
        seg2 - payload @ 0 in mbuf from pool2

Now buffer split can be configured in two modes. User can choose length
or protocol header to configure buffer split according to NIC's
capability. For length based buffer split, the mp, length, offset field
in Rx packet segment should be configured, while the proto_hdr field
must be 0. For protocol header based buffer split, the mp, offset,
proto_hdr field in Rx packet segment should be configured, while the
length field must be 0.

Note: When protocol header split is enabled, NIC may receive packets
which do not match all the protocol headers within the Rx segments.
At this point, NIC will have two possible split behaviors according to
matching results, one is exact match, another is longest match.
The split result of NIC must belong to one of them.

The exact match means NIC only do split when the packets exactly match all
the protocol headers in the segments. Otherwise, the whole packet will be
put into the last valid mempool. The longest match means NIC will do split
until packets mismatch the protocol header in the segments. The rest will
be put into the last valid pool.

Pseudo-code for exact match:
FOR each seg in segs except last one
    IF proto_hdr is not matched THEN
        BREAK
    END IF
END FOR
IF loop breaked THEN
    put whole pkt in last seg
ELSE
    put protocol header in each seg
    put everything else in last seg
END IF

Pseudo-code for longest match:
FOR each seg in segs except last one
    IF proto_hdr is matched THEN
        put protocol header in seg
    ELSE
        BREAK
    END IF
END FOR
put everything else in last seg

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-09 16:41:27 +02:00
Yuan Wang
e4e6f4cbf9 ethdev: introduce protocol header API
Add a new ethdev API to retrieve supported protocol headers
of a PMD, which helps to configure protocol header based buffer split.

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-09 16:41:24 +02:00
Hanumanth Pothula
458485eb21 ethdev: support multiple mbuf pools per Rx queue
Some of the HW has support for choosing memory pools based on the
packet's size.

This is often useful for saving the memory where the application
can create a different pool to steer the specific size of the
packet, thus enabling more efficient usage of memory.

For example, let's say HW has a capability of three pools,
 - pool-1 size is 2K
 - pool-2 size is > 2K and < 4K
 - pool-3 size is > 4K
Here,
        pool-1 can accommodate packets with sizes < 2K
        pool-2 can accommodate packets with sizes > 2K and < 4K
        pool-3 can accommodate packets with sizes > 4K

With multiple mempool capability enabled in SW, an application may
create three pools of different sizes and send them to PMD. Allowing
PMD to program HW based on the packet lengths. So that packets with
less than 2K are received on pool-1, packets with lengths between 2K
and 4K are received on pool-2 and finally packets greater than 4K
are received on pool-3.

Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-08 18:39:02 +02:00
Andrew Rybchenko
b7fc7c5366 ethdev: factor out helper function to check Rx mempool
Avoid Rx mempool checks duplication logic.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-08 18:34:55 +02:00
Dariusz Sosnowski
bc705061cb ethdev: introduce hairpin memory capabilities
Before this patch, implementation details and configuration of hairpin
queues were decided internally by the PMD. Applications had no control
over the configuration of Rx and Tx hairpin queues, despite number of
descriptors, explicit Tx flow mode and disabling automatic binding.
This patch addresses that by adding:

- Hairpin queue capabilities reported by PMDs.
- New configuration options for Rx and Tx hairpin queues.

Main goal of this patch is to allow applications to provide
configuration hints regarding placement of hairpin queues.
These hints specify whether buffers of hairpin queues should be placed
in host memory or in dedicated device memory. Different memory options
may have different performance characteristics and hairpin configuration
should be fine-tuned to the specific application and use case.

This patch introduces new hairpin queue configuration options through
rte_eth_hairpin_conf struct, allowing to tune Rx and Tx hairpin queues
memory configuration. Hairpin configuration is extended with the
following fields:

- use_locked_device_memory - If set, PMD will use specialized on-device
  memory to store RX or TX hairpin queue data.
- use_rte_memory - If set, PMD will use DPDK-managed memory to store RX
  or TX hairpin queue data.
- force_memory - If set, PMD will be forced to use provided memory
  settings. If no appropriate resources are available, then device start
  will fail. If unset and no resources are available, PMD will fallback
  to using default type of resource for given queue.

If application chooses to use PMD default memory configuration, all of
these flags should remain unset.

Hairpin capabilities are also extended, to allow verification of support
of given hairpin memory configurations. Struct rte_eth_hairpin_cap is
extended with two additional fields of type rte_eth_hairpin_queue_cap:

- rx_cap - memory capabilities of hairpin RX queues.
- tx_cap - memory capabilities of hairpin TX queues.

Struct rte_eth_hairpin_queue_cap exposes whether given queue type
supports use_locked_device_memory and use_rte_memory flags.

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
2022-10-08 18:22:01 +02:00
Jerin Jacob
6b81dddbb9 ethdev: support congestion management
NIC HW controllers often come with congestion management support on
various HW objects such as Rx queue depth or mempool queue depth.

Also, it can support various modes of operation such as RED
(Random early discard), WRED etc on those HW objects.

Add a framework to express such modes(enum rte_cman_mode) and
introduce (enum rte_eth_cman_obj) to enumerate the different
objects where the modes can operate on.

Add RTE_CMAN_RED mode of operation and RTE_ETH_CMAN_OBJ_RX_QUEUE,
RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL objects.

Introduce reserved fields in configuration structure
backed by rte_eth_cman_config_init() to add new configuration
parameters without ABI breakage.

Add rte_eth_cman_info_get() API to get the information such as
supported modes and objects.

Add rte_eth_cman_config_init(), rte_eth_cman_config_set() APIs
to configure congestion management on those object with associated mode.

Finally, add rte_eth_cman_config_get() API to retrieve the
applied configuration.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
2022-10-07 11:50:28 +02:00
Dongdong Liu
092b701fe3 ethdev: introduce Rx/Tx descriptor dump API
Added the ethdev Rx/Tx desc dump API which provides functions for query
descriptor from device. HW descriptor info differs in different NICs.
The information demonstrates I/O process which is important for debug.
As the information is different between NICs, the new API is introduced.

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-10-06 18:38:48 +02:00
Thomas Monjalon
04cf171cb3 doc: relate bifurcated driver and flow isolated mode
The relation between the isolated mode in ethdev flow API
and bifurcated driver behaviour was not clearly explained.

It is made clear in the how-to guide that isolated mode is required
for flow bifurcation to the kernel.
On the other side, the impact of the isolated mode on a bifurcated
driver is made more explicit.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
2022-10-04 17:01:03 +02:00
Olivier Matz
7dcd73e379 drivers/bus: set device NUMA node to unknown by default
The dev->device.numa_node field is set by each bus driver for
every device it manages to indicate on which NUMA node this device lies.

When this information is unknown, the assigned value is not consistent
across the bus drivers.

Set the default value to SOCKET_ID_ANY (-1) by all bus drivers
when the NUMA information is unavailable. This change impacts
rte_eth_dev_socket_id() in the same manner.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2022-10-06 21:26:55 +02:00
Satha Rao
3a26e41e68 ethdev: increase queue rate parameter from 16b to 32b
The rate parameter modified to uint32_t, so that it can work
for more than 64 Gbps.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-04 13:52:05 +02:00
Xuan Ding
8d54b1ec4a ethdev: remove Rx header split port offload
As announced in the deprecation note, remove the Rx offload flag
'RTE_ETH_RX_OFFLOAD_HEADER_SPLIT' and 'split_hdr_size' field from
the structure 'rte_eth_rxmode'. Meanwhile, the place where the examples
and apps initialize the 'split_hdr_size' field, and where the drivers
check if the 'split_hdr_size' value is 0 are also removed.

User can still use `RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT` for per-queue packet
split offload, which is configured by 'rte_eth_rxseg_split'.

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-04 11:20:04 +02:00
Michael Savisko
6838dd4bf9 ethdev: add send to kernel action
In some cases application may receive a packet that should have been
received by the kernel. In this case application uses KNI or other means
to transfer the packet to the kernel.

With bifurcated driver we can have a rule to route packets matching
a pattern (example: IPv4 packets) to the DPDK application and the rest
of the traffic will be received by the kernel.
But if we want to receive most of the traffic in DPDK except specific
pattern (example: ICMP packets) that should be processed by the kernel,
then it's easier to re-route these packets with a single rule.

This commit introduces new rte_flow action which allows application to
re-route packets directly to the kernel without software involvement.

Add new testpmd rte_flow action 'send_to_kernel'. The application
may use this action to route the packet to the kernel while still
in the HW.

Example with testpmd command:

flow create 0 ingress priority 0 group 1 pattern eth type spec 0x0800
type mask 0xffff / end actions send_to_kernel / end

Signed-off-by: Michael Savisko <michaelsav@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-04 09:47:31 +02:00
Ivan Malov
bd2a4d4b2e ethdev: forbid direction attribute in transfer flow rules
As part of DPDK 21.11 release, it was announced that the
use of attributes 'ingress' and 'egress' in 'transfer'
rules was deprecated. The transition period is over.

Starting from DPDK 22.11, the use of direction attributes
with attribute 'transfer' is not allowed. To enforce that,
a generic check is added to flow rule validate API.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
2022-10-04 03:35:43 +02:00
Andrew Rybchenko
8ff9bb8aff ethdev: remove deprecated flow actions to copy TTL
These actions are supported by no drivers.

The patch breaks ABI.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Ori Kam <orika@nvidia.com>
2022-10-04 03:09:01 +02:00
Andrew Rybchenko
0cde57caff ethdev: remove deprecated flow action to set layer 3 TTL
The action is supported by no drivers.

The patch breaks ABI.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Ori Kam <orika@nvidia.com>
2022-10-04 03:08:52 +02:00
Andrew Rybchenko
8c2fa4fd02 ethdev: remove deprecated flow action to decrement MPLS TTL
The action is supported by no drivers.

The patch breaks ABI.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Ori Kam <orika@nvidia.com>
2022-10-04 03:08:10 +02:00
Andrew Rybchenko
e7b571a977 ethdev: remove deprecated flow action to set MPLS TTL
The action is supported by no drivers.

The patch breaks ABI.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Ori Kam <orika@nvidia.com>
2022-10-04 03:08:01 +02:00
Sunil Kumar Kori
204daeea01 ethdev: add protocol parameter to color table update
Using rte_mtr_color_in_protocol_set(), user can configure
combination of protocol headers, like outer_vlan and outer_ip,
can be enabled on given meter object.

But rte_mtr_meter_vlan_table_update() and
rte_mtr_meter_dscp_table_update() do not have information that
which table needs to be updated corresponding to protocol header
i.e. inner or outer.

Adding protocol paramreter will allow user to provide required
protocol information so that corresponding inner or outer table
can be updated corresponding to protocol header.

If user wishes to configure both inner and outer table then
API must be called twice with correct protocol information.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-10-03 13:43:53 +02:00
Alexander Kozyrev
9c4a0c1859 ethdev: add meter color mark flow action
Create a new Flow API action: METER_MARK.
It Meters a packet stream and marks its packets with colors.
The marking is done on a metadata, not on a packet field.
Unlike the METER action, it performs no policing at all.
A user has the flexibility to create any policies with the help of
the METER_COLOR item later, only meter profile is mandatory here.

Add testpmd command line to match for METER_MARK action:
	flow create ... actions meter_mark mtr_profile 20 / end

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-09-29 09:07:36 +02:00
Alexander Kozyrev
ece19cca30 ethdev: get meter profile/policy objects
Introduce a new Meter API to retrieve a Meter profile and policy
objects using the profile/policy ID previously created with
meter_profile_add() and meter_policy_create() functions.
That allows to save the pointer and avoid any lookups in the
corresponding lists for quick access during a flow rule creation.
Also, it eliminates the need for CIR, CBS and EBS calculations
and conversion to a PMD-specific format when the profile is used.
Pointers are destroyed and cannot be used after the corresponding
meter_profile_delete() or meter_policy_delete() are called.

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-09-29 09:07:35 +02:00
Alexander Kozyrev
443401d0f8 ethdev: allow meter color marker modification
Extend modify_field Flow API with support of Meter Color Marker
modifications. It allows setting the packet's metadata to any
color marker: green, yellow or red. A user is able to specify
an initial packet color for Meter API or create simple Metering
and Marking flow rules based on his own coloring algorithm.

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-09-29 09:07:33 +02:00
Alexander Kozyrev
3af7a4af1a ethdev: add meter color flow matching item
Provide an ability to use a Color Marker set by a Meter
as a matching item in Flow API. The Color Marker reflects
the metering result by setting the metadata for a
packet to a particular codepoint: green, yellow or red.

Add testpmd command line to match on a meter color:
	flow create 0 ingress group 0 pattern meter color is green / end

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-09-29 09:06:24 +02:00
Chengwen Feng
8af559f94c ethdev: support telemetry private dump
This patch supports telemetry private dump a ethdev port.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
2022-10-03 12:03:36 +02:00
Suanming Mou
c9dc038408 ethdev: add indirect action async query
As rte_flow_action_handle_create/destroy/update() have their own
asynchronous rte_flow_async_action_handle_create/destroy/update()
version functions to accelerate the indirect action operations in
queue based flow engine. Currently, the asynchronous version query
function for indirect action was missing.

Add rte_flow_async_action_handle_query() function corresponding
to rte_flow_action_handle_query(). The new asynchronous version
function enables enqueue the query to the hardware similar as
asynchronous flow management does and returns immediately to free
the CPU for other tasks. Application can get the query results from
rte_flow_pull() when the hardware completes its work.

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
2022-09-28 10:47:34 +02:00
Suanming Mou
3d7c08e4ef ethdev: add async flow connection tracking configuration
In queue based async flow engine, in order to optimize the flow
insertion rate, PMD can use the hints from application to have
resources pre-allocate during initialization phase for actions
such as count/meter/aging.

This commit adds the connection tracking action hints.

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
2022-09-28 10:23:03 +02:00
Morten Brørup
3f9acb5c83 ethdev: avoid non-dataplane checks in Rx queue count
Applications may use rte_eth_rx_queue_count() in the Rx stage of the
dataplane, so only check the function parameters if built with
RTE_ETHDEV_DEBUG_RX.

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-09-28 09:56:28 +02:00
Dariusz Sosnowski
c4574aed94 ethdev: add GTP PSC QFI field to modify action
Introduce GTP PSC QFI modify field and add testpmd CLI command support.

An example for copying GTP QFI field using modify_field action:

    modify_field op set dst_type meta src_type gtp_psc_qfi width 8

An example of setting GTP QFI field value to 0x1f using modify_field
action:

    modify_field op set dst_type gtp_psc_qfi src_type value src_value 1f
                 width 8

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
2022-09-26 16:55:01 +02:00
Akhil Goyal
0aaf097585 ethdev: add MACsec flow item
A new flow item is defined for MACsec flows which can be
offloaded to an inline device. If the flow matches with
MACsec header, device will process as per the security
session created using rte_security APIs.
If an error comes while MACsec processing in HW, PMD will
notify with the events defined in this patch.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Ori Kam <orika@nvidia.com>
2022-09-28 21:31:02 +02:00
Vamsi Attunuru
d1ce79d14b ethdev: add IPsec SA expiry event subtypes
Patch adds new event subtypes for notifying expiry
events upon reaching IPsec SA soft packet expiry and
hard packet/byte expiry limits.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2022-09-27 20:31:16 +02:00
Ivan Malov
235558fe94 ethdev: remove deprecated flow action physical port
Such deprecation was commenced in DPDK 21.11.
Since then, no parties have objected. Remove.

The patch breaks ABI.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
2022-09-27 10:26:51 +02:00
Ivan Malov
5e3779b7ab ethdev: remove deprecated flow item physical port
Such deprecation was commenced in DPDK 21.11.
Since then, no parties have objected. Remove.

The patch breaks ABI.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
2022-09-27 10:26:51 +02:00
Ivan Malov
5c45fde3e9 ethdev: remove deprecated flow item VF
Such deprecation was commenced in DPDK 21.11.
Since then, no parties have objected. Remove.

The patch breaks ABI.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
2022-09-27 10:26:51 +02:00
Ivan Malov
13f8de927a ethdev: remove deprecated flow item PF
Such deprecation was commenced in DPDK 21.11.
Since then, no parties have objected. Remove.

The patch breaks ABI.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
2022-09-27 10:26:51 +02:00
Ivan Malov
50a239fac6 ethdev: promote flow transfer proxy API
rte_flow_pick_transfer_proxy() was first added to DPDK 21.11.
Since then, no one has requested any fixes. At the same time,
the API is required by series [1] in OvS for the new release.

[1] http://patchwork.ozlabs.org/project/openvswitch/list/?series=310415

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
2022-09-27 10:26:50 +02:00
Ivan Malov
41b7de3534 ethdev: promote port ID items and actions as stable
The following set of primitives has been introduced in 21.11:

- RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR
- RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT
- RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
- RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT

Since then, no one has requested any fixes. At the same time,
the set is required by series [1] in OvS for the new release.

[1] http://patchwork.ozlabs.org/project/openvswitch/list/?series=310415

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
2022-09-27 10:26:33 +02:00
Ivan Malov
fc0a92937a ethdev: promote Rx metadata negotiation API
rte_eth_rx_metadata_negotiate() was introduced in DPDK 21.11.
Since then, no one has requested any fixes. At the same time,
the API is required by series [1] in OvS for the new release.

[1] http://patchwork.ozlabs.org/project/openvswitch/list/?series=310415

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-09-27 10:25:48 +02:00
Andrew Rybchenko
5007ac1318 ethdev: remove deprecated Flow Director configuration
Remove deprecated fdir_conf from device configuration.
Assume that mode is equal to RTE_FDIR_MODE_NONE.

Add internal Flow Director configuration copy in ixgbe and txgbe device
private data since flow API supports requires it. Initialize mode to
the first flow rule mode on the rule validation or creation.

Since Flow Director configuration data types are still used by some
drivers internally, move it from public API to ethdev driver internal
API.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Dongdong Liu <liudongdong3@huawei.com>
2022-08-31 15:24:23 +02:00
Andrew Rybchenko
36eccf7b4a ethdev: remove deprecated metadata dynamic fields defines
Remove deprecated ``PKT_{R,T}X_DYNF_METADATA`` defines. Use
corresponding defines ``RTE_MBUF_DYNFLAG_{R,T}X_METADATA`` instead.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-24 09:57:19 +02:00
Andrew Rybchenko
16acf7b1fc ethdev: remove deprecated maximum Rx MAC addresses define
Remove deprecated ``ETH_NUM_RECEIVE_MAC_ADDR`` define.
Use corresponding define with ``RTE_`` prefix instead.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-24 09:57:14 +02:00
Andrew Rybchenko
ab8701199e ethdev: remove deprecated VLAN offload configuration defines
Remove deprecated ``ETH_VLAN_*`` and ``ETH_QINQ_`` defines.
Use corresponding defines with ``RTE_`` prefix instead.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-24 09:57:10 +02:00
Andrew Rybchenko
25def33d71 ethdev: remove deprecated flow control defines
Remove deprecated ``RTE_FC_*`` defines. Use corresponding defines
with ``RTE_ETH_FC_`` prefix instead.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-24 09:57:06 +02:00
Andrew Rybchenko
25b77b6089 ethdev: remove deprecated tunnel type defines
Remove deprecated ``RTE_TUNNEL_*`` defines. Use corresponding defines
with ``RTE_ETH_TUNNEL_`` prefix instead.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-24 09:57:02 +02:00
Andrew Rybchenko
935b9a43b3 ethdev: remove deprecated DCB and VMDq defines
Remove deprecated ``ETH_DCB_*``, ``ETH_VMDQ_``, ``ETH_*_TCS``,
``ETH_*_POOLS`` and ``ETH_MAX_VMDQ_POOL`` defines. Use corresponding
defines with ``RTE_`` prefix instead.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-24 09:56:58 +02:00
Andrew Rybchenko
3be1c23343 ethdev: remove deprecated Rx and Tx offload defines
Remove deprecated ``DEV_RX_OFFLOAD_*`` and ``DEV_TX_OFFLOAD_`` defines.
Use corresponding defines with ``RTE_ETH_RX_OFFLOAD_`` and
``RTE_ETH_TX_OFFLOAD_`` prefix instead.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-24 09:56:53 +02:00
Andrew Rybchenko
683f93efb8 ethdev: remove deprecated defines for RSS configuration
Remove deprecated ``ETH_RSS_*`` defines used for hash function and RETA
size specification.  Use corresponding defines with ``RTE_`` prefix
instead.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-24 09:56:49 +02:00
Andrew Rybchenko
0593c208a4 ethdev: remove deprecated Rx and Tx multi-queue mode defines
Remove deprecated ``ETH_MQ_RX_*`` and ``ETH_MQ_TX_*`` defines.
Use corresponding defines with ``RTE_`` prefix instead.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-24 09:56:45 +02:00
Andrew Rybchenko
667c74defa ethdev: remove deprecated link speed and duplex defines
Remove deprecated ``ETH_LINK_SPEED_``, ``ETH_SPEED_NUM_`` and
``ETH_LINK_`` defines. Use corresponding defines with ``RTE_`` prefix
instead.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-24 09:55:54 +02:00
David Marchand
ec5ecd7e37 dev: introduce device accessors
Prepare for making the device object opaque by adding accessors.
Update existing "external" users.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
1acb7f5474 dev: hide driver object
Make rte_driver opaque for non internal users.
This will make extending this object possible without breaking the ABI.

Introduce a new driver header and move rte_driver definition.
Update drivers and library to use the internal header.

Some applications may have been dereferencing rte_driver objects, mark
this object's accessors as stable.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
97bbdba31d dev: introduce driver accessors
Prepare for making the driver object opaque by adding accessors.
Update existing "external" users.
Internal users may still dereference a rte_driver object.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00