From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net ([184.105.139.130]:53798 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751342AbeCEPXl (ORCPT ); Mon, 5 Mar 2018 10:23:41 -0500 Date: Mon, 05 Mar 2018 10:23:39 -0500 (EST) Message-Id: <20180305.102339.1643465658148939503.davem@davemloft.net> To: felix.manlunas@cavium.com Cc: netdev@vger.kernel.org, raghu.vatsavayi@cavium.com, derek.chickles@cavium.com, satananda.burla@cavium.com, intiyaz.basha@cavium.com Subject: Re: [PATCH net-next] liquidio: Added ndo_get_phys_port_id support From: David Miller In-Reply-To: <20180303025910.GA26255@felix-thinkpad.cavium.com> References: <20180303025910.GA26255@felix-thinkpad.cavium.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: From: Felix Manlunas Date: Fri, 2 Mar 2018 18:59:10 -0800 > Added support to the ndo_get_phys_port_id() callback to provide > port specific unique id to the netdev layer. > > Port id needs to be unique across different liquidio devices in the system. > So used MAC address for port_id. This doesn't look right at all. The physical port ID is used in order to distinguish several netdev devices present on the same PHYSICAL PORT. So you should be using a number that is unique within a physical port. Using the MAC address for this doesn't make any sense at all.