From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 04631A3; Fri, 29 Mar 2019 09:43:33 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Mar 2019 01:43:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,283,1549958400"; d="scan'208";a="286950898" Received: from dpdk6.bj.intel.com ([172.16.182.192]) by orsmga004.jf.intel.com with ESMTP; 29 Mar 2019 01:43:31 -0700 From: Wei Zhao To: dev@dpdk.org Cc: wenzhuo.lu@intel.com, stable@dpdk.org, qi.z.zhang@intel.com, Wei Zhao Date: Fri, 29 Mar 2019 16:15:45 +0800 Message-Id: <1553847345-54013-1-git-send-email-wei.zhao1@intel.com> X-Mailer: git-send-email 2.7.5 In-Reply-To: <1553844685-52291-1-git-send-email-wei.zhao1@intel.com> References: <1553844685-52291-1-git-send-email-wei.zhao1@intel.com> Subject: [dpdk-dev] [PATCH v2] net/ixgbe: enable 10Mb/s link setup for x553 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Mar 2019 08:43:34 -0000 There is need to eanble 10Mb/s link foixgbe NIC of x553. This new device has own device id of 0x15E4 and 0x15E5, so ixgbe PMD driver need to special check when setup link for these two types of device. Signed-off-by: Wei Zhao --- v2: delete test code and change permit link speed --- drivers/net/ixgbe/ixgbe_ethdev.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 97e1021..0aef577 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2701,6 +2701,10 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev) allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G | ETH_LINK_SPEED_2_5G | ETH_LINK_SPEED_5G | ETH_LINK_SPEED_10G; + if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T || + hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L) + allowed_speeds = ETH_LINK_SPEED_10M | + ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G; break; default: allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G | @@ -2742,6 +2746,8 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev) speed |= IXGBE_LINK_SPEED_1GB_FULL; if (*link_speeds & ETH_LINK_SPEED_100M) speed |= IXGBE_LINK_SPEED_100_FULL; + if (*link_speeds & ETH_LINK_SPEED_10M) + speed |= IXGBE_LINK_SPEED_10_FULL; } err = ixgbe_setup_link(hw, speed, link_up); @@ -4061,8 +4067,12 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev, switch (link_speed) { default: case IXGBE_LINK_SPEED_UNKNOWN: + if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T || + hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L) + link.link_speed = ETH_SPEED_NUM_10M; + else + link.link_speed = ETH_SPEED_NUM_100M; link.link_duplex = ETH_LINK_FULL_DUPLEX; - link.link_speed = ETH_SPEED_NUM_100M; break; case IXGBE_LINK_SPEED_100_FULL: -- 1.8.3.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 4E499A05D3 for ; Fri, 29 Mar 2019 09:43:37 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 719C52BF4; Fri, 29 Mar 2019 09:43:36 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 04631A3; Fri, 29 Mar 2019 09:43:33 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Mar 2019 01:43:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,283,1549958400"; d="scan'208";a="286950898" Received: from dpdk6.bj.intel.com ([172.16.182.192]) by orsmga004.jf.intel.com with ESMTP; 29 Mar 2019 01:43:31 -0700 From: Wei Zhao To: dev@dpdk.org Cc: wenzhuo.lu@intel.com, stable@dpdk.org, qi.z.zhang@intel.com, Wei Zhao Date: Fri, 29 Mar 2019 16:15:45 +0800 Message-Id: <1553847345-54013-1-git-send-email-wei.zhao1@intel.com> X-Mailer: git-send-email 2.7.5 In-Reply-To: <1553844685-52291-1-git-send-email-wei.zhao1@intel.com> References: <1553844685-52291-1-git-send-email-wei.zhao1@intel.com> Subject: [dpdk-dev] [PATCH v2] net/ixgbe: enable 10Mb/s link setup for x553 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190329081545.q6FCo8PwXynNWo7Y2SoSTlMEh4pzt90CeBM94MDf4Uw@z> There is need to eanble 10Mb/s link foixgbe NIC of x553. This new device has own device id of 0x15E4 and 0x15E5, so ixgbe PMD driver need to special check when setup link for these two types of device. Signed-off-by: Wei Zhao --- v2: delete test code and change permit link speed --- drivers/net/ixgbe/ixgbe_ethdev.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 97e1021..0aef577 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2701,6 +2701,10 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev) allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G | ETH_LINK_SPEED_2_5G | ETH_LINK_SPEED_5G | ETH_LINK_SPEED_10G; + if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T || + hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L) + allowed_speeds = ETH_LINK_SPEED_10M | + ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G; break; default: allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G | @@ -2742,6 +2746,8 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev) speed |= IXGBE_LINK_SPEED_1GB_FULL; if (*link_speeds & ETH_LINK_SPEED_100M) speed |= IXGBE_LINK_SPEED_100_FULL; + if (*link_speeds & ETH_LINK_SPEED_10M) + speed |= IXGBE_LINK_SPEED_10_FULL; } err = ixgbe_setup_link(hw, speed, link_up); @@ -4061,8 +4067,12 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev, switch (link_speed) { default: case IXGBE_LINK_SPEED_UNKNOWN: + if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T || + hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L) + link.link_speed = ETH_SPEED_NUM_10M; + else + link.link_speed = ETH_SPEED_NUM_100M; link.link_duplex = ETH_LINK_FULL_DUPLEX; - link.link_speed = ETH_SPEED_NUM_100M; break; case IXGBE_LINK_SPEED_100_FULL: -- 1.8.3.1