[dpdk-dev] [PATCH 05/31] net/i40e: set TX loopback from PF
Ferruh Yigit
ferruh.yigit at intel.com
Fri Dec 2 12:22:58 CET 2016
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 <wenzhuo.lu at intel.com>
> ---
> 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?
More information about the dev
mailing list