On 3/22/2017 9:48 AM, Pascal Mazon wrote: > Supported flow rules are now mapped to TC rules on the tap netdevice. > The netlink message used for creating the TC rule is stored in struct > rte_flow. That way, by simply changing a metadata in it, we can require > for the rule deletion without further parsing. > > Supported items: > - eth: src and dst (with variable masks), and eth_type (0xffff mask). > - vlan: vid, pcp, tpid, but not eid. > - ipv4/6: src and dst (with variable masks), and ip_proto (0xffff mask). > - udp/tcp: src and dst port (0xffff) mask. > > Supported actions: > - DROP > - QUEUE > - PASSTHRU > > It is generally not possible to provide a "last" item. However, if the > "last" item, once masked, is identical to the masked spec, then it is > supported. > > Only IPv4/6 and MAC addresses can use a variable mask. All other > items need a full mask (exact match). > > Support for VLAN requires kernel headers >= 4.9, checked using > auto-config.sh. > > Signed-off-by: Pascal Mazon <pascal.ma...@6wind.com> > Acked-by: Olga Shern <ol...@mellanox.com>
<...> > diff --git a/doc/guides/nics/tap.rst b/doc/guides/nics/tap.rst > index c4f207be3b47..cdb528b5eae4 100644 > --- a/doc/guides/nics/tap.rst > +++ b/doc/guides/nics/tap.rst > @@ -82,6 +82,29 @@ can utilize that stack to handle the network protocols. > Plus you would be able > to address the interface using an IP address assigned to the internal > interface. > > +Flow API support > +---------------- > + > +The tap PMD supports major flow API pattern items and actions, when running > on > +linux kernels above 4.2 ("Flower" classifier required). Supported items: > + > +- eth: src and dst (with variable masks), and eth_type (0xffff mask). > +- vlan: vid, pcp, tpid, but not eid. (requires kernel 4.9) > +- ipv4/6: src and dst (with variable masks), and ip_proto (0xffff mask). > +- udp/tcp: src and dst port (0xffff) mask. > + > +Supported actions: > + > +- DROP > +- QUEUE > +- PASSTHRU > + > +It is generally not possible to provide a "last" item. However, if the "last" > +item, once masked, is identical to the masked spec, then it is supported. > + > +Only IPv4/6 and MAC addresses can use a variable mask. All other items need a > +full mask (exact match). > + > Example > ------- Hi Pascal, I believe this is a good feature that deserves more explanation, would you mind adding more documentation, more use cases and a few testpmd usage samples? btw, you can keep Ack from Keith for next version. Thanks, ferruh