From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH 12/22] app/testpmd: add rte_flow item spec handler Date: Fri, 16 Dec 2016 10:17:46 +0100 Message-ID: <20161216091746.GC10340@6wind.com> References: <2d37e8ee1c613557e94acef94e381b72b2a535ce.1479309720.git.adrien.mazarguil@6wind.com> <188971FCDA171749BED5DA74ABF3E6F03B6625B9@shsmsx102.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "dev@dpdk.org" , Thomas Monjalon , "De Lara Guarch, Pablo" , Olivier Matz , "Xing, Beilei" To: "Pei, Yulong" Return-path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 98C512C0A for ; Fri, 16 Dec 2016 10:17:54 +0100 (CET) Received: by mail-wm0-f47.google.com with SMTP id c184so12625252wmd.0 for ; Fri, 16 Dec 2016 01:17:54 -0800 (PST) Content-Disposition: inline In-Reply-To: <188971FCDA171749BED5DA74ABF3E6F03B6625B9@shsmsx102.ccr.corp.intel.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" Hi Yulong, On Fri, Dec 16, 2016 at 03:01:15AM +0000, Pei, Yulong wrote: > Hi Adrien, > > I try to setup the following rule, but it seems that after set 'spec' param, can not set 'mask' param, is it an issue here or am I wrong to use it ? > > testpmd> flow create 0 ingress pattern eth dst spec 00:00:00:00:09:00 > dst [TOKEN]: destination MAC > src [TOKEN]: source MAC > type [TOKEN]: EtherType > / [TOKEN]: specify next pattern item You need to re-specify dst with "mask" instead of "spec". You can specify it as many times you like to update each structure in turn, e.g.: testpmd> flow create 0 ingress pattern eth dst spec 00:00:00:00:09:00 dst mask 00:00:00:00:ff:ff If you want to specify both spec and mask at once assuming you want it full, these commands yield the same result: testpmd> flow create 0 ingress pattern eth dst fix 00:00:00:00:09:00 testpmd> flow create 0 ingress pattern eth dst spec 00:00:00:00:09:00 dst mask ff:ff:ff:ff:ff:ff testpmd> flow create 0 ingress pattern eth dst spec 00:00:00:00:09:00 dst prefix 48 You are even allowed to change your mind: testpmd> flow create 0 ingress pattern eth dst fix 00:00:2a:2a:2a:2a dst fix 00:00:00:00:09:00 All these will be properly documented in the v2 patchset. Note, this version will replace the "fix" keyword with "is" ("fix" made no sense according to feedback). -- Adrien Mazarguil 6WIND