From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v6 4/4] net/tap: add basic flow API patterns and actions Date: Wed, 22 Mar 2017 13:56:29 +0000 Message-ID: References: <8f5acc79a48179dcd696fc915709f260b23931ca.1490175951.git.pascal.mazon@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Pascal Mazon , keith.wiles@intel.com Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 212AD1094 for ; Wed, 22 Mar 2017 14:56:32 +0100 (CET) In-Reply-To: <8f5acc79a48179dcd696fc915709f260b23931ca.1490175951.git.pascal.mazon@6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > Acked-by: Olga Shern <...> > 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