From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua0-f193.google.com (mail-ua0-f193.google.com [209.85.217.193]) by dpdk.org (Postfix) with ESMTP id ADE6C1BB30 for ; Wed, 11 Apr 2018 16:01:24 +0200 (CEST) Received: by mail-ua0-f193.google.com with SMTP id d3so872536uae.4 for ; Wed, 11 Apr 2018 07:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=0xqsln1Ek/fHCouEroMh5Anhpeb3Z+8u6uMSQuitRps=; b=pqPBy+SzvO4bcnKUVVZQaXhrC24IlAHBYqRclQQvLElqPRNy5M0xH2c0gAR4oO6lbO SrMXKfwajckvu8S0OrDwvzTiuyAnOLn1f026pnOPIQAaK9oiwqRfZrYXz+ylFbhT0NmC n2Ajz1OM0k07t5t/XJL8zj5qbW0u9BWYanoZ6uXFQo92WNTIWGV+SzKIjOCFv21fAsUe CQ0p8wGYvhBVgK/8VHcTVNCuWjmRLdby9evugiwf8vPJMQ9FXLo07EKkPJgqFSqB/2CV B0JKZajy14dCpKeEvH9VTy5PGNvWXO6vLCkaXLzqeVMGlnrTQb7liFDPYoE9swdC6OEr jE4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=0xqsln1Ek/fHCouEroMh5Anhpeb3Z+8u6uMSQuitRps=; b=J+7ElVPuO9zWI3VmhDtkqlpzB0pmnwhPA/Vk0MJluXsEGuNRoohMCMNgNiQLqjp744 FHH8MhM5m6ZLm7JiAK7OcOx8ehmrBEkWbXZm/EqNuRE5ndsAK3lJC0xOi8AZJP8uuxna jPQSgNDMqOsb5kqL+6v+Eu86AxkFEB/7wSKzSYlRJR2TV0VZZ7DByltZlvzbo3hYdirY iKSQ7KhPAhOqD55PtYYZ9OhVt4bmCtuwbqLsaOJsfSl7wCzbHXXT+ON5Exg8O+e0dT2m 7AJMyQwy4tvXf/ZvKzvmJ/trX6pDLQCDCex7J+TeUy8Ue4yFYtKKwnzACy2dVd6d6N9B a6mg== X-Gm-Message-State: ALQs6tCc7XOeamOI+wI5QSDxBwVBDbov8711W9phC1pM95a4njq3JeZa vD33HvqYWLAV5c0q7uCHK63e/aJWGaS2MxOFUdI= X-Google-Smtp-Source: AIpwx48JfQukqipNoml1cwsmIIU3S3PFvvC6MOKirxK5rz70xAYuP2B202r03lZYv7TTFOlHMWyZR8Xboxt6tZ/1Qr8= X-Received: by 10.176.30.138 with SMTP id o10mr3573479uak.184.1523455282877; Wed, 11 Apr 2018 07:01:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.1.179 with HTTP; Wed, 11 Apr 2018 07:01:22 -0700 (PDT) In-Reply-To: <6A0DE07E22DDAD4C9103DF62FEBC09093B75F6E8@shsmsx102.ccr.corp.intel.com> References: <20180321173618.74200-1-shweta.choudaha@gmail.com> <20180321173618.74200-2-shweta.choudaha@gmail.com> <6A0DE07E22DDAD4C9103DF62FEBC09093B75F6E8@shsmsx102.ccr.corp.intel.com> From: Shweta Choudaha Date: Wed, 11 Apr 2018 15:01:22 +0100 Message-ID: To: "Lu, Wenzhuo" Cc: "dev@dpdk.org" , "Ananyev, Konstantin" , "Zhang, Helin" , "Yigit, Ferruh" , "shweta.choudaha@att.com" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2 1/1] net/ixgbe: Add access and locking APIs for MDIO 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, 11 Apr 2018 14:01:25 -0000 Thanks for the review. I have sent an updated patch. regards, Shweta On Wed, Apr 4, 2018 at 3:15 AM, Lu, Wenzhuo wrote: > Hi Shweta, > > > -----Original Message----- > > From: Shweta Choudaha [mailto:shweta.choudaha@gmail.com] > > Sent: Thursday, March 22, 2018 1:36 AM > > To: dev@dpdk.org > > Cc: Lu, Wenzhuo ; Ananyev, Konstantin > > ; Zhang, Helin ; > > Yigit, Ferruh ; shweta.choudaha@att.com > > Subject: [PATCH v2 1/1] net/ixgbe: Add access and locking APIs for MDIO > > > > From: Shweta Choudaha > > > > Add ixgbe MDIO lock/unlock and access APIs to read and write registers > using > > specific device address. This provides MDIO access to any devices that > are > > not associated with the autoprobed PHY.Export these APIs via the map file > > > > Signed-off-by: Shweta Choudaha > > Reviewed-by: Chas Williams > > Reviewed-by: Luca Boccassi > > --- > > drivers/net/ixgbe/rte_pmd_ixgbe.c | 203 > > ++++++++++++++++++++++++++++ > > drivers/net/ixgbe/rte_pmd_ixgbe.h | 71 ++++++++++ > > drivers/net/ixgbe/rte_pmd_ixgbe_version.map | 9 ++ > > 3 files changed, 283 insertions(+) > > > > diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c > > b/drivers/net/ixgbe/rte_pmd_ixgbe.c > > index d8ca8ca31..1846af89b 100644 > > --- a/drivers/net/ixgbe/rte_pmd_ixgbe.c > > +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c > > @@ -5,6 +5,8 @@ > > #include > > > > #include "base/ixgbe_api.h" > > +#include "base/ixgbe_x540.h" > > +#include "base/ixgbe_x550.h" > > #include "ixgbe_ethdev.h" > > #include "rte_pmd_ixgbe.h" > > > > @@ -1012,3 +1014,204 @@ rte_pmd_ixgbe_bypass_wd_reset(uint16_t > > port_id) > > return ixgbe_bypass_wd_reset(dev); > > } > > #endif > > + > > +/** > > + * rte_pmd_ixgbe_acquire_swfw - Acquire SWFW semaphore > > + * @hw: pointer to hardware structure > > + * @mask: Mask to specify which semaphore to acquire > > + * > > + * Acquires the SWFW semaphore and get the shared phy token as needed > > +*/ STATIC s32 rte_pmd_ixgbe_acquire_swfw(struct ixgbe_hw *hw, u32 mask) > > +{ > > + int retries = FW_PHY_TOKEN_RETRIES; > > + s32 status = IXGBE_SUCCESS; > > + > > + while (--retries) { > > + status = ixgbe_acquire_swfw_sync_X540(hw, mask); > " ixgbe_acquire_swfw_sync_X540" is only for x540. Why not using " > ixgbe_acquire_swfw_semaphore" which is common. > The same for " ixgbe_release_swfw_sync_X540". > > > > a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map > > b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map > > index bf776742c..88a91627a 100644 > > --- a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map > > +++ b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map > > @@ -52,3 +52,12 @@ DPDK_17.08 { > > rte_pmd_ixgbe_bypass_wd_timeout_show; > > rte_pmd_ixgbe_bypass_wd_timeout_store; > > } DPDK_17.05; > > + > > +EXPERIMENTAL { > > + global: > > + > > + rte_pmd_ixgbe_lock_mdio; > > + rte_pmd_ixgbe_unlock_mdio; > > + rte_pmd_ixgbe_mdio_read_unlocked; > > + rte_pmd_ixgbe_mdio_write_unlocked; > > +} DPDK_17.08; > 17.08 is old. Should add a 18.05 here. > > > -- > > 2.11.0 > >