From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 18038C79C for ; Fri, 26 Jun 2015 04:37:35 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 25 Jun 2015 19:37:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,681,1427785200"; d="scan'208";a="717906337" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 25 Jun 2015 19:37:34 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t5Q2bWrw020857; Fri, 26 Jun 2015 10:37:32 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t5Q2bTgD022204; Fri, 26 Jun 2015 10:37:31 +0800 Received: (from heshaope@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t5Q2bSwO022200; Fri, 26 Jun 2015 10:37:28 +0800 From: Shaopeng He To: dev@dpdk.org Date: Fri, 26 Jun 2015 10:37:26 +0800 Message-Id: <1435286246-22170-1-git-send-email-shaopeng.he@intel.com> X-Mailer: git-send-email 1.7.4.1 Cc: Shaopeng He Subject: [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: Fri, 26 Jun 2015 02:37:36 -0000 The default MAC address is directly copied to Device Ethernet Link address array in the device initialize phase, which bypasses fm10k MAC address number check mechanism, and will cause an error message when adding default VLAN. Fix it by moving default MAC address registration to device initialize phase. Signed-off-by: Shaopeng He --- drivers/net/fm10k/fm10k_ethdev.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 406c350..df32665 100644 --- 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; } -- 1.9.3