From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] l3fwd: fix incorrect size for destination port values Date: Thu, 31 Mar 2016 22:44:34 +0200 Message-ID: <1567958.mM9YQ1diUO@xps13> References: <1459429639-30700-1-git-send-email-konstantin.ananyev@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Konstantin Ananyev Return-path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 5AA9D9616 for ; Thu, 31 Mar 2016 22:46:28 +0200 (CEST) Received: by mail-wm0-f42.google.com with SMTP id 127so147058493wmu.1 for ; Thu, 31 Mar 2016 13:46:28 -0700 (PDT) In-Reply-To: <1459429639-30700-1-git-send-email-konstantin.ananyev@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-03-31 14:07, Konstantin Ananyev: > Fixes: dc81ebbacaeb ("lpm: extend IPv4 next hop field") > > Originally l3fwd used 16-bit value to store dest_port value. > To accommodate 24-bit nexthop dest_port was increased to 32-bit, > though some further packet processing code remained unchanged and > still expects dest_port to be 16-bit. > That is not correct and can cause l3fwd invalid behaviour or even > process crash/hang on some input packet patterns. > For the fix, I choose the simplest approach and restored dest_port > as 16-bit value, plus necessary conversions from 32 to 16 bit values > after lpm_lookupx4. > > Signed-off-by: Konstantin Ananyev Applied, thanks