From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by dpdk.org (Postfix) with ESMTP id B128B5A8C for ; Wed, 1 Jul 2015 15:13:14 +0200 (CEST) Received: by wiwl6 with SMTP id l6so164808106wiw.0 for ; Wed, 01 Jul 2015 06:13:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=X0gAlEX1dcKBcDah0Tg2p5V4Ghs7vZMuORDIlwQf8TM=; b=BEC9ON5rPiwSxGXA/XJyT03CWUkJU+U6SmmtA9HaToNBPweuG0xuQc2WZhjynKBdWm VHvo5cr2pQ6Ae3Vlq4l1SXl4n6Q8VYj3OEVWfkXlpNraTBpLSavfD3tCfIpb8oLrDBiJ +Zdrj9n8+JHWgVc6Xcpq/JWsUPlN7otjyH+nA0+rsDSRoycQ4Y3fWj2mX2W7N7YNcR/d XGtVPiu1eyMdDJGHNZpbmcHdZhe632Ehxor5+d7ZwnypzExpShRUeMFTSrgtZnf7HVR9 6NTA2+mwROi5w1LepfxD5N+4NLeWOqok6FRIxKxhz0wSU5uCt6EDF0c8eFB2cquJalT3 IhAw== X-Gm-Message-State: ALoCoQmQ0ifRH7EB2nWR7W1CsqvI4fZFaTQgt79aBhWRohM5KPFh8uWTuqDltJqaeQCe06Va9VAx X-Received: by 10.194.246.105 with SMTP id xv9mr49393498wjc.135.1435756394539; Wed, 01 Jul 2015 06:13:14 -0700 (PDT) Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.151.210]) by mx.google.com with ESMTPSA id fm8sm3400969wib.9.2015.07.01.06.13.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jul 2015 06:13:13 -0700 (PDT) From: Thomas Monjalon To: Shaopeng He Date: Wed, 01 Jul 2015 15:12:06 +0200 Message-ID: <1800411.8kbBBvrOci@xps13> Organization: 6WIND User-Agent: KMail/4.14.8 (Linux/4.0.4-2-ARCH; KDE/4.14.8; x86_64; ; ) In-Reply-To: <1435286246-22170-1-git-send-email-shaopeng.he@intel.com> References: <1435286246-22170-1-git-send-email-shaopeng.he@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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: Wed, 01 Jul 2015 13:13:14 -0000 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 Do you mean "device start phase" instead? > bypasses fm10k MAC address number check mechanism, and will > cause an error message when adding default VLAN. Fix it by What is the error message? Is it only an error message or a behaviour error? > moving default MAC address registration to device > initialize phase. Yes it is moved from start to init. > --- 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 <= ETHER_MAX_VLAN_ID) { > - /* Update default vlan */ > + /* Update default vlan */ > + if (hw->mac.default_vid && hw->mac.default_vid <= 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; > } >