From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] nfp: flower: fix port metadata conversion bug Date: Sat, 28 Jul 2018 14:28:06 -0700 (PDT) Message-ID: <20180728.142806.240219202550083982.davem@davemloft.net> References: <20180728035652.22604-1-jakub.kicinski@netronome.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: oss-drivers@netronome.com, netdev@vger.kernel.org, john.hurley@netronome.com To: jakub.kicinski@netronome.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:56466 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730949AbeG1Wz7 (ORCPT ); Sat, 28 Jul 2018 18:55:59 -0400 In-Reply-To: <20180728035652.22604-1-jakub.kicinski@netronome.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Jakub Kicinski Date: Fri, 27 Jul 2018 20:56:52 -0700 > From: John Hurley > > Function nfp_flower_repr_get_type_and_port expects an enum nfp_repr_type > return value but, if the repr type is unknown, returns a value of type > enum nfp_flower_cmsg_port_type. This means that if FW encodes the port > ID in a way the driver does not understand instead of dropping the frame > driver may attribute it to a physical port (uplink) provided the port > number is less than physical port count. > > Fix this and ensure a net_device of NULL is returned if the repr can not > be determined. > > Fixes: 1025351a88a4 ("nfp: add flower app") > Signed-off-by: John Hurley > Signed-off-by: Jakub Kicinski > --- > This is low impact and unlikely, but also fix is trivial so either > net or net-next works. Applied to 'net', thanks.