From: Ferruh Yigit Subject: Re: [PATCH v2 13/13] net/enic: fix several issues with inner packet matching Date: Mon, 4 Mar 2019 16:58:28 +0000 Message-ID: References: <20190302104251.32565-1-hyonkim@cisco.com> <20190302104251.32565-14-hyonkim@cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, John Daley To: Hyong Youb Kim Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 73E642B9E for ; Mon, 4 Mar 2019 17:58:32 +0100 (CET) In-Reply-To: <20190302104251.32565-14-hyonkim@cisco.com> Content-Language: en-US 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/2/2019 10:42 AM, Hyong Youb Kim wrote: > Inner packet matching is currently buggy in many cases. > > 1. Mishandling null spec ("match any"). > The copy_item functions do nothing if spec is null. This is incorrect, > as all patterns should be appended to the L5 pattern buffer even for > null spec (treated as all zeros). > > 2. Accessing null spec causing segfault. > > 3. Not setting protocol fields. > The NIC filter API currently has no flags for "match inner IPv4, IPv6, > UDP, TCP, and so on". So, the driver needs to explicitly set EtherType > and IP protocol fields in the L5 pattern buffer to avoid false > positives (e.g. reporting IPv6 as IPv4). > > Instead of keep adding "if inner, do something differently" cases to > the existing copy_item functions, introduce separate functions for > inner packet patterns and address the above issues in those > functions. The changes to the previous outer-packet copy_item > functions are mechanical, due to reduced indentation. > > Fixes: 6ced137607d0 ("net/enic: flow API for NICs with advanced filters enabled") > > Signed-off-by: Hyong Youb Kim <...> I have added "Cc: stable@dpdk.org" tag while merging. If the tag explicitly left out to prevent backport please let me know to remove the tag back.