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 7EDEF2BA2 for ; Wed, 31 May 2017 05:29:55 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 May 2017 20:29:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,421,1491289200"; d="scan'208";a="974926153" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 30 May 2017 20:29:54 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 30 May 2017 20:29:54 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 30 May 2017 20:29:54 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.146]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.116]) with mapi id 14.03.0319.002; Wed, 31 May 2017 11:29:50 +0800 From: "Lu, Wenzhuo" To: "Nicolau, Radu" , "dev@dpdk.org" CC: "Yigit, Ferruh" , "Iremonger, Bernard" , "Nicolau, Radu" Thread-Topic: [dpdk-dev] [PATCH v2] ethdev: moved bypass functions to ixgbe pmd Thread-Index: AQHS2I/9HGQbwxed5UqnKFO6+VSwmaINyl4A Date: Wed, 31 May 2017 03:29:49 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B5C8F21@shsmsx102.ccr.corp.intel.com> References: <1495809036-29625-1-git-send-email-radu.nicolau@intel.com> <1496071373-21907-1-git-send-email-radu.nicolau@intel.com> In-Reply-To: <1496071373-21907-1-git-send-email-radu.nicolau@intel.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] ethdev: moved bypass functions to ixgbe pmd 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, 31 May 2017 03:29:57 -0000 Hi Radu, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Radu Nicolau > Sent: Monday, May 29, 2017 11:23 PM > To: dev@dpdk.org > Cc: Yigit, Ferruh; Iremonger, Bernard; Nicolau, Radu > Subject: [dpdk-dev] [PATCH v2] ethdev: moved bypass functions to ixgbe > pmd >=20 > Moved all bypass functions to ixgbe pmd and removed function pointers > from the eth_dev_ops struct. >=20 > Changes in v2: > CONFIG_RTE_NIC_BYPASS removed, new option in the IXGBE section added, > CONFIG_RTE_LIBRTE_IXGBE_BYPASS. > Updated test-pmd to always include the bypass commands. >=20 > Signed-off-by: Radu Nicolau > diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c > b/drivers/net/ixgbe/rte_pmd_ixgbe.c > index e8fc9a6..efcaf68 100644 > --- a/drivers/net/ixgbe/rte_pmd_ixgbe.c > +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c > @@ -908,3 +908,109 @@ rte_pmd_ixgbe_set_tc_bw_alloc(uint8_t port, >=20 > return 0; > } > + > +#ifdef RTE_LIBRTE_IXGBE_BYPASS > +int > +rte_pmd_ixgbe_bypass_init(uint8_t port_id) { > + struct rte_eth_dev *dev; > + > + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); Please reference the existing code to check "is_ixgbe_supported" here. Beca= use this API may be called by APP directly. The same comments for all the other APIs below. > + > + dev =3D &rte_eth_devices[port_id]; > + ixgbe_bypass_init(dev); > + return 0; > +} > + > +int > +rte_pmd_ixgbe_bypass_state_show(uint8_t port_id, uint32_t *state) { > + struct rte_eth_dev *dev; > + > + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > + > + dev =3D &rte_eth_devices[port_id]; > + return ixgbe_bypass_state_show(dev, state); } > + > +int > +rte_pmd_ixgbe_bypass_state_set(uint8_t port_id, uint32_t *new_state) { > + struct rte_eth_dev *dev; > + > + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > + > + dev =3D &rte_eth_devices[port_id]; > + return ixgbe_bypass_state_store(dev, new_state); } > + > +int > +rte_pmd_ixgbe_bypass_event_show(uint8_t port_id, > + uint32_t event, > + uint32_t *state) > +{ > + struct rte_eth_dev *dev; > + > + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > + > + dev =3D &rte_eth_devices[port_id]; > + return ixgbe_bypass_event_show(dev, event, state); } > + > +int > +rte_pmd_ixgbe_bypass_event_store(uint8_t port_id, > + uint32_t event, > + uint32_t state) > +{ > + struct rte_eth_dev *dev; > + > + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > + > + dev =3D &rte_eth_devices[port_id]; > + return ixgbe_bypass_event_store(dev, event, state); } > + > +int > +rte_pmd_ixgbe_bypass_wd_timeout_store(uint8_t port_id, uint32_t > +timeout) { > + struct rte_eth_dev *dev; > + > + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > + > + dev =3D &rte_eth_devices[port_id]; > + return ixgbe_bypass_wd_timeout_store(dev, timeout); } > + > +int > +rte_pmd_ixgbe_bypass_ver_show(uint8_t port_id, uint32_t *ver) { > + struct rte_eth_dev *dev; > + > + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > + > + dev =3D &rte_eth_devices[port_id]; > + return ixgbe_bypass_ver_show(dev, ver); } > + > +int > +rte_pmd_ixgbe_bypass_wd_timeout_show(uint8_t port_id, uint32_t > +*wd_timeout) { > + struct rte_eth_dev *dev; > + > + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > + > + dev =3D &rte_eth_devices[port_id]; > + return ixgbe_bypass_wd_timeout_show(dev, wd_timeout); } > + > +int > +rte_pmd_ixgbe_bypass_wd_reset(uint8_t port_id) { > + struct rte_eth_dev *dev; > + > + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > + > + dev =3D &rte_eth_devices[port_id]; > + return ixgbe_bypass_wd_reset(dev); > +}