From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490190993; x=1521726993; h=subject:to:references:cc:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=xrf5qbPLjT4GK8QwrY7y7Bt6tvuPrA5jehs2RDNwirU=; b=dnxIN+9/kZ2LCbLsM+MiG6oaeTwXbeoO5RDgRNbHVp/GzA8HnmNH9559 jDNhE8mZP9dCq8aYuKwL5AOqkgoYNg==; Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Mar 2017 06:56:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,205,1486454400"; d="scan'208";a="78191160" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.122]) ([10.237.220.122]) by orsmga005.jf.intel.com with ESMTP; 22 Mar 2017 06:56:30 -0700 To: Pascal Mazon , keith.wiles@intel.com References: <8f5acc79a48179dcd696fc915709f260b23931ca.1490175951.git.pascal.mazon@6wind.com> Cc: dev@dpdk.org From: Ferruh Yigit Message-ID: Date: Wed, 22 Mar 2017 13:56:29 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <8f5acc79a48179dcd696fc915709f260b23931ca.1490175951.git.pascal.mazon@6wind.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v6 4/4] net/tap: add basic flow API patterns and actions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2017 13:56:33 -0000 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