From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH 05/31] net/i40e: set TX loopback from PF Date: Fri, 2 Dec 2016 11:22:58 +0000 Message-ID: <8c7cc824-df86-4939-c619-008e54fd22e1@intel.com> References: <1480637533-37425-1-git-send-email-wenzhuo.lu@intel.com> <1480637533-37425-6-git-send-email-wenzhuo.lu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit To: Wenzhuo Lu , dev@dpdk.org Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 3174968AB for ; Fri, 2 Dec 2016 12:23:00 +0100 (CET) In-Reply-To: <1480637533-37425-6-git-send-email-wenzhuo.lu@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 12/2/2016 12:11 AM, Wenzhuo Lu wrote: > Support enabling/disabling TX loopback from PF. > User can call the API on PF to enable/disable TX loopback > for all the PF and VFs. > > Signed-off-by: Wenzhuo Lu > --- > drivers/net/i40e/i40e_ethdev.c | 219 ++++++++++++++++++++++++++++++ > drivers/net/i40e/rte_pmd_i40e.h | 16 +++ > drivers/net/i40e/rte_pmd_i40e_version.map | 1 + > 3 files changed, 236 insertions(+) > > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c > index ec863b9..9fe9672 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -9938,3 +9938,222 @@ static void i40e_set_default_mac_addr(struct rte_eth_dev *dev, <...> > +static int > +i40e_vsi_set_tx_loopback(struct i40e_vsi *vsi, uint8_t on) > +{ > + struct i40e_vsi_context ctxt; > + struct i40e_hw *hw; > + int ret; > + > + hw = I40E_VSI_TO_HW(vsi); > + > + /* Use the FW API if FW >= v5.0 */ > + if (hw->aq.fw_maj_ver < 5) { > + PMD_INIT_LOG(ERR, "FW < v5.0, cannot enable loopback"); > + return -ENOSYS; Checkpatch complains about ENOSYS usage: WARNING:ENOSYS: ENOSYS means 'invalid syscall nr' and nothing else What is intended error code here?