From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from stargate.chelsio.com (stargate.chelsio.com [12.32.117.8]) by dpdk.org (Postfix) with ESMTP id 07E8E1DA4 for ; Wed, 23 May 2018 20:02:21 +0200 (CEST) Received: from localhost (scalar.blr.asicdesigners.com [10.193.185.94]) by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id w4NI2IC2013435; Wed, 23 May 2018 11:02:18 -0700 From: Rahul Lakkireddy To: dev@dpdk.org Cc: shaguna@chelsio.com, kumaras@chelsio.com, nirranjan@chelsio.com, indranil@chelsio.com Date: Wed, 23 May 2018 23:30:49 +0530 Message-Id: <1527098449-10298-1-git-send-email-rahul.lakkireddy@chelsio.com> X-Mailer: git-send-email 2.5.3 Subject: [dpdk-dev] [PATCH] net/cxgbe: report configured link auto-negotiation 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: Wed, 23 May 2018 18:02:22 -0000 Report current configured link auto-negotiation. Also initialize rte_eth_link. Coverity issue: 280648 Fixes: f5b3c7b29357 ("net/cxgbevf: fix inter-VM traffic when physical link down") Signed-off-by: Rahul Lakkireddy --- drivers/net/cxgbe/cxgbe_ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index 61115e26a..32450915c 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -204,13 +204,14 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev, struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private); struct adapter *adapter = pi->adapter; struct sge *s = &adapter->sge; - struct rte_eth_link new_link; + struct rte_eth_link new_link = { 0 }; unsigned int work_done, budget = 4; cxgbe_poll(&s->fw_evtq, NULL, budget, &work_done); new_link.link_status = force_linkup(adapter) ? ETH_LINK_UP : pi->link_cfg.link_ok; + new_link.link_autoneg = pi->link_cfg.autoneg; new_link.link_duplex = ETH_LINK_FULL_DUPLEX; new_link.link_speed = pi->link_cfg.speed; -- 2.14.1