From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id C4A89CE7 for ; Thu, 2 Jul 2015 08:34:35 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 01 Jul 2015 23:34:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,390,1432623600"; d="scan'208";a="754563250" Received: from pgsmsx108.gar.corp.intel.com ([10.221.44.103]) by fmsmga002.fm.intel.com with ESMTP; 01 Jul 2015 23:34:34 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by PGSMSX108.gar.corp.intel.com (10.221.44.103) with Microsoft SMTP Server (TLS) id 14.3.224.2; Thu, 2 Jul 2015 14:33:08 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.165]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.246]) with mapi id 14.03.0224.002; Thu, 2 Jul 2015 14:33:07 +0800 From: "He, Shaopeng" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH] fm10k: fix an error message when adding default VLAN Thread-Index: AQHQr7kbflz91eawU0GjgrIsO7RwH53GGX8AgAGiUWA= Date: Thu, 2 Jul 2015 06:33:06 +0000 Message-ID: References: <1435286246-22170-1-git-send-email-shaopeng.he@intel.com> <1800411.8kbBBvrOci@xps13> In-Reply-To: <1800411.8kbBBvrOci@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] fm10k: fix an error message when adding default VLAN X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2015 06:34:36 -0000 Hi Thomas, > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Wednesday, July 01, 2015 9:12 PM > To: He, Shaopeng > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] fm10k: fix an error message when adding > default VLAN >=20 > 2015-06-26 10:37, Shaopeng He: > > The default MAC address is directly copied to Device Ethernet Link > > address array in the device initialize phase, which >=20 > Do you mean "device start phase" instead? Thanks for taking time to review this patch. The default MAC address is rea= d from hardware and copied to dev->data->mac_addrs in eth_fm10k_dev_init, but the fm10k_MAC= _filter_set previously was called in fm10k_dev_start, which caused this issue. >=20 > > bypasses fm10k MAC address number check mechanism, and will cause an > > error message when adding default VLAN. Fix it by >=20 > What is the error message? > Is it only an error message or a behaviour error? The error message is "MAC address number not match", it is only an error me= ssage, because fm10k_dev_start will eventually be called when default_vid was ready, and M= AC/VLAN table will be updated correctly. default_vid is necessary for fm10k to function c= orrectly. >=20 > > moving default MAC address registration to device initialize phase. >=20 > Yes it is moved from start to init. fm10k_MAC_filter_set is moved from eth_fm10k_dev_init to eth_fm10k_dev_init= , aligned with=20 the place where the default MAC address is actually read and copied. >=20 > > --- a/drivers/net/fm10k/fm10k_ethdev.c > > +++ b/drivers/net/fm10k/fm10k_ethdev.c > > @@ -791,14 +791,10 @@ fm10k_dev_start(struct rte_eth_dev *dev) > > } > > } > > > > - if (hw->mac.default_vid && hw->mac.default_vid <=3D > ETHER_MAX_VLAN_ID) { > > - /* Update default vlan */ > > + /* Update default vlan */ > > + if (hw->mac.default_vid && hw->mac.default_vid <=3D > ETHER_MAX_VLAN_ID) > > fm10k_vlan_filter_set(dev, hw->mac.default_vid, true); > > > > - /* Add default mac/vlan filter to PF/Switch manager */ > > - fm10k_MAC_filter_set(dev, hw->mac.addr, true); > > - } > > - > > return 0; > > } > > > > @@ -2144,6 +2140,8 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev) > > > > fm10k_mbx_unlock(hw); > > > > + /* Add default mac address */ > > + fm10k_MAC_filter_set(dev, hw->mac.addr, true); > > > > return 0; > > } > > >=20