[dpdk-dev] [PATCH 1/2] ethdev: announce flow API action PORT_ID changes

Andrew Rybchenko andrew.rybchenko at oktetlabs.ru
Sun Aug 1 14:03:59 CEST 2021


On 8/1/21 1:57 PM, Eli Britstein wrote:
> 
> On 8/1/2021 1:22 PM, Andrew Rybchenko wrote:
>> External email: Use caution opening links or attachments
>>
>>
>> By its very name, action PORT_ID means that packets hit an ethdev with 
>> the
>> given DPDK port ID. At least the current comments don't state the 
>> opposite.
>> That said, since port representors had been adopted, applications like 
>> OvS
>> have been misusing the action. They misread its purpose as sending 
>> packets
>> to the opposite end of the "wire" plugged to the given ethdev, for 
>> example,
>> redirecting packets to the VF itself rather than to its representor 
>> ethdev.
>> Another example: OvS relies on this action with the admin PF's ethdev 
>> port
>> ID specified in it in order to send offloaded packets to the physical 
>> port.
>>
>> Since there might be applications which use this action in its valid 
>> sense,
>> one can't just change the documentation to greenlight the opposite 
>> meaning.
>>
>> The documentation must be clarified and rte_flow_action_port_id structure
>> should be extended to support both meanings.
> 
> I think the only clarification needed is that PORT_ID acts as if 
> rte_eth_tx_burst is called with the specified port-id.

Sorry, but I still think that it is opposite meaning to the current
documentation which says "Directs matching traffic to a given DPDK port 
ID." Since it happens on switching level (transfer rule) "to a given
DPDK port" means that it will be received on a given DPDK port.

Anyway, the goal of the deprecation notice is to highlight that it must
be fixed and ensure that we can choose right decision even if it
breaks API/ABI.

> Regarding representors, it's not different. When using TX on a 
> representor port, the packets appear as RX on its represented port.
> 
> Please elaborate if there is a use case for the PORT_ID~ in which the 
> app can get the packets using rte_eth_rx_burst on the specified port-id.

Multi-home host with a NIC with two physical ports and two PFs used
by DPDK app with layer 3 (IP addresses). Different cores used to handle
traffic from different ports plus routing in DPDK app. If traffic to
port #0 IP address is received on phys port #1, it is useful to redirect
traffic to port ID 0 directly to have these packets on correct CPU cores
from the very beginning to avoid SW mechanisms to pass from port #1 CPU
cores to port #0 CPU cores.

>>
>> Signed-off-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
>> ---
>>   doc/guides/rel_notes/deprecation.rst | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/doc/guides/rel_notes/deprecation.rst 
>> b/doc/guides/rel_notes/deprecation.rst
>> index d9c0e65921..6e6413c89f 100644
>> --- a/doc/guides/rel_notes/deprecation.rst
>> +++ b/doc/guides/rel_notes/deprecation.rst
>> @@ -158,3 +158,8 @@ Deprecation Notices
>>   * security: The functions ``rte_security_set_pkt_metadata`` and
>>     ``rte_security_get_userdata`` will be made inline functions and 
>> additional
>>     flags will be added in structure ``rte_security_ctx`` in DPDK 21.11.
>> +
>> +* ethdev: Definition of the flow API action PORT_ID is ambiguous and 
>> needs
>> +  clarification. Structure rte_flow_action_port_id will be extended to
>> +  specify traffic direction to represented entity or ethdev port 
>> itself in
>> +  DPDK 21.11.
>> -- 
>> 2.30.2
>>



More information about the dev mailing list