From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 9139E1BADA for ; Wed, 4 Apr 2018 04:18:35 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Apr 2018 19:18:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,404,1517904000"; d="scan'208";a="30511073" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga007.jf.intel.com with ESMTP; 03 Apr 2018 19:18:34 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 3 Apr 2018 19:18:33 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.61]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.92]) with mapi id 14.03.0319.002; Wed, 4 Apr 2018 10:15:58 +0800 From: "Lu, Wenzhuo" To: Shweta Choudaha , "dev@dpdk.org" CC: "Ananyev, Konstantin" , "Zhang, Helin" , "Yigit, Ferruh" , "shweta.choudaha@att.com" Thread-Topic: [PATCH v2 1/1] net/ixgbe: Add access and locking APIs for MDIO Thread-Index: AQHTwTtBHxzcLyLKJEy4DM9+CQaYO6Pv8hpg Date: Wed, 4 Apr 2018 02:15:58 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B75F6E8@shsmsx102.ccr.corp.intel.com> References: <20180321173618.74200-1-shweta.choudaha@gmail.com> <20180321173618.74200-2-shweta.choudaha@gmail.com> In-Reply-To: <20180321173618.74200-2-shweta.choudaha@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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, 04 Apr 2018 02:18:36 -0000 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 >=20 > From: Shweta Choudaha >=20 > Add ixgbe MDIO lock/unlock and access APIs to read and write registers us= ing > specific device address. This provides MDIO access to any devices that ar= e > not associated with the autoprobed PHY.Export these APIs via the map file >=20 > 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(+) >=20 > 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 >=20 > #include "base/ixgbe_api.h" > +#include "base/ixgbe_x540.h" > +#include "base/ixgbe_x550.h" > #include "ixgbe_ethdev.h" > #include "rte_pmd_ixgbe.h" >=20 > @@ -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 =3D FW_PHY_TOKEN_RETRIES; > + s32 status =3D IXGBE_SUCCESS; > + > + while (--retries) { > + status =3D ixgbe_acquire_swfw_sync_X540(hw, mask); " ixgbe_acquire_swfw_sync_X540" is only for x540. Why not using " ixgbe_acq= uire_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