From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 05E672952; Wed, 10 May 2017 09:08:12 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 May 2017 00:08:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,318,1491289200"; d="scan'208";a="100200318" Received: from dpdk6.bj.intel.com ([172.16.182.81]) by fmsmga006.fm.intel.com with ESMTP; 10 May 2017 00:08:10 -0700 From: Wei Dai To: wenzhuo.lu@intel.com, konstantin.ananyev@intel.com Cc: dev@dpdk.org, Wei Dai , stable@dpdk.org Date: Wed, 10 May 2017 15:00:02 +0800 Message-Id: <1494399602-33955-1-git-send-email-wei.dai@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-stable] [PATCH] net/ixgbe: fix calling null function of VF X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 07:08:14 -0000 hw->mac.ops.get_media-type() of ixgbe VF is NULL and should not be called directly. It had better be replaced by calling ixgbe_get_media_type( ) to avoid crash. Fixes: c12d22f65b13 ("net/ixgbe: ensure link status is updated") Cc: stable@dpdk.org Signed-off-by: Wei Dai --- drivers/net/ixgbe/ixgbe_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index ec667d8..ed2baec 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -3799,7 +3799,7 @@ ixgbe_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete) hw->mac.get_link_status = true; if ((intr->flags & IXGBE_FLAG_NEED_LINK_CONFIG) && - hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) { + ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) { speed = hw->phy.autoneg_advertised; if (!speed) ixgbe_get_link_capabilities(hw, &speed, &autoneg); -- 2.7.4