From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f173.google.com (mail-wr0-f173.google.com [209.85.128.173]) by dpdk.org (Postfix) with ESMTP id 123052BAA for ; Wed, 10 May 2017 11:34:59 +0200 (CEST) Received: by mail-wr0-f173.google.com with SMTP id z52so35475907wrc.2 for ; Wed, 10 May 2017 02:34:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=weka.io; s=google; h=from:to:cc:subject:date:message-id:organization:in-reply-to :references:mime-version:content-transfer-encoding; bh=8QNM32Npc5l2Vhn79A73zowmmp9C1Y5pNBP7ph+OX9Y=; b=sjnD3ZnYjkRhp7R2QBrMS75Y91owmx8jkpO6cPDg4aDg4QvjO2vzllTzLpltumuEQY TIu0gZ3RVTpbl9vLeTtIU2VHXJJ9/Ml1HiQlMFgUhsIfvDqC5rQW0KJ88xiCote/zAQg Y+kKQQXhur/FCYifZ3/pI9Zbmy6W+CuLVATcc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :in-reply-to:references:mime-version:content-transfer-encoding; bh=8QNM32Npc5l2Vhn79A73zowmmp9C1Y5pNBP7ph+OX9Y=; b=O54dnaGKqMOzhaW4yoAF453rK5UYgjLDhQCoVJ1HBn9M+QwvCrZiGQcaltW9r+wZxc p79oFlOOlp9hKa2gRL+W2I66NzG50fuYYPUby5PGzeLhtRVR0izfrd5lMyou7AYlAWxX sVji3NPGdrPeDelwwPF0XQ+S+N7sH7jt35DiN7nJSc7o2vj6BRCRpuAaYo1LjZZ2LmE3 9rtDX6XG+Q+l75ROLllojTVOHLYYeJ8xICDa7vBgi/seOXPd4HpghWRpH+92IezFXsXo 6BbGpgzWnDtxp8AmNTyBCHuN1jkgmqmqCUdn8YLvRsWT0B1k29etgmp9uTiBdmEQ/3qk 8siQ== X-Gm-Message-State: AODbwcA4tbxwgl4RoE6gyTSdVMv8FVeUMEj24LNr4nDNIIGDw765BoiA 8Y8ea0Iu9mweA5jX X-Received: by 10.223.134.153 with SMTP id 25mr3053411wrx.29.1494408898787; Wed, 10 May 2017 02:34:58 -0700 (PDT) Received: from polaris.localnet (bzq-82-81-85-138.red.bezeqint.net. [82.81.85.138]) by smtp.gmail.com with ESMTPSA id s75sm2853928wmd.3.2017.05.10.02.34.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 May 2017 02:34:57 -0700 (PDT) From: Gregory Etelson To: dev@dpdk.org Cc: Wei Dai , wenzhuo.lu@intel.com, konstantin.ananyev@intel.com, stable@dpdk.org Date: Wed, 10 May 2017 12:34:56 +0300 Message-ID: <1659459.pG3zMYDirW@polaris> Organization: Weka.IO In-Reply-To: <1494399602-33955-1-git-send-email-wei.dai@intel.com> References: <1494399602-33955-1-git-send-email-wei.dai@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-stable] [dpdk-dev] [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 09:34:59 -0000 Hello, The patch you proposed fixed a crash I experienced in IXGBE VF. However, there's still another crash possibility if the code will proceed with speed == 0 condition to ixgbe_get_link_capabilities VF mac.ops.get_link_capabilities is also set to NULL; Regards, Gregory On Wednesday, 10 May 2017 10:00:02 IDT Wei Dai wrote: > 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); >