From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH v2] net/tap: fix zeroed flow mask configurations Date: Mon, 6 Aug 2018 15:16:26 +0200 Message-ID: <20180806131626.GW5211@6wind.com> References: <1533205980-7874-1-git-send-email-matan@mellanox.com> <1533553127-18664-1-git-send-email-matan@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Keith Wiles , Ophir Munk , dev@dpdk.org, stable@dpdk.org To: Matan Azrad Return-path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id AC4DE1B4DA for ; Mon, 6 Aug 2018 15:16:44 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id o11-v6so13721773wmh.2 for ; Mon, 06 Aug 2018 06:16:44 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1533553127-18664-1-git-send-email-matan@mellanox.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 Mon, Aug 06, 2018 at 10:58:47AM +0000, Matan Azrad wrote: > The rte_flow meaning of zero flow mask configuration is to match all > the range of the item value. > For example, the flow eth / ipv4 dst spec 1.2.3.4 dst mask 0.0.0.0 > should much all the ipv4 traffic from the rte_flow API perspective. > > From some kernel perspectives the above rule means to ignore all the > ipv4 traffic (e.g. Ubuntu 16.04, 4.15.10). > > Due to the fact that the tap PMD should provide the rte_flow meaning, > it is necessary to ignore the spec in case the mask is zero when it > forwards such like flows to the kernel. > So, the above rule should be translated to eth / ipv4 to get the > correct meaning. > > Ignore spec configurations when the mask is zero. > > Fixes: de96fe68ae95 ("net/tap: add basic flow API patterns and actions") > Cc: stable@dpdk.org > > Signed-off-by: Matan Azrad > --- > drivers/net/tap/tap_flow.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > > V2: > Address Adrien comments to fix also the spec=0 check. Thanks, Acked-by: Adrien Mazarguil -- Adrien Mazarguil 6WIND