From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 02 Dec 2016 03:23:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,729,1477983600"; d="scan'208";a="907949453" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.29]) ([10.237.220.29]) by orsmga003.jf.intel.com with ESMTP; 02 Dec 2016 03:22:59 -0800 To: Wenzhuo Lu , dev@dpdk.org References: <1480637533-37425-1-git-send-email-wenzhuo.lu@intel.com> <1480637533-37425-6-git-send-email-wenzhuo.lu@intel.com> From: Ferruh Yigit Message-ID: <8c7cc824-df86-4939-c619-008e54fd22e1@intel.com> Date: Fri, 2 Dec 2016 11:22:58 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: <1480637533-37425-6-git-send-email-wenzhuo.lu@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 05/31] net/i40e: set TX loopback from PF 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: Fri, 02 Dec 2016 11:23:01 -0000 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?