DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Radu Nicolau <radu.nicolau@intel.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] ethdev: moved bypass functions to ixgbe pmd
Date: Mon, 29 May 2017 11:38:43 +0100	[thread overview]
Message-ID: <defe25c5-d07b-8141-00f3-deb585d706cb@intel.com> (raw)
In-Reply-To: <1495809036-29625-1-git-send-email-radu.nicolau@intel.com>

On 5/26/2017 3:30 PM, Radu Nicolau wrote:
> Moved all bypass functions to ixgbe pmd and removed function
> pointers from the eth_dev_ops struct.

Hi Radu,

Thanks for taking care of this, this was waiting for a while.

> 
> Also cleared some checkpatch errors.
> 
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>

<...>

> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index 0afac68..66f9e63 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -523,7 +523,7 @@ static void cmd_help_long_parsed(void *parsed_result,
>  			"   Flush (default) or don't flush RX streams before"
>  			" forwarding. Mainly used with PCAP drivers.\n\n"
>  
> -			#ifdef RTE_NIC_BYPASS
> +#if defined(RTE_NIC_BYPASS) && defined(RTE_LIBRTE_IXGBE_PMD)

What we did for other PMD specific API is:
Enable commands always, do not disable them with compile time options,
this is mostly to prevent different test paths.

And move PMD specific #ifdefs into function, if the PMDs that support
his feature are not enabled return not supported error.

And if function called for port_id that doesn't support the function,
again return not supported.

>  			"set bypass mode (normal|bypass|isolate) (port_id)\n"
>  			"   Set the bypass mode for the lowest port on bypass enabled"
>  			" NIC.\n\n"
> @@ -3904,7 +3904,7 @@ cmdline_parse_inst_t cmd_set_link_check = {
>  	},
>  };
>  

<...>

> diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c b/drivers/net/ixgbe/rte_pmd_ixgbe.c
> index e8fc9a6..2b44a33 100644
> --- a/drivers/net/ixgbe/rte_pmd_ixgbe.c
> +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c
> @@ -908,3 +908,110 @@ rte_pmd_ixgbe_set_tc_bw_alloc(uint8_t port,
>  
>  	return 0;
>  }
> +
> +#ifdef RTE_NIC_BYPASS
> +int
> +rte_pmd_ixgbe_bypass_init(uint8_t port_id)
> +{
> +	struct rte_eth_dev *dev;

Should we add a check to all APIs if the port_id is ixgbe port_id? In
case user provided a port_id of different NIC?

> +
> +	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
> +
> +	dev = &rte_eth_devices[port_id];
> +	ixgbe_bypass_init(dev);
> +	return 0;
> +}

<...>

  reply	other threads:[~2017-05-29 10:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-26 14:30 Radu Nicolau
2017-05-29 10:38 ` Ferruh Yigit [this message]
2017-05-29 15:22 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
2017-05-31  3:29   ` Lu, Wenzhuo
2017-05-31  7:41     ` Dai, Wei
2017-05-31 11:10   ` [dpdk-dev] [PATCH v3] " Radu Nicolau
2017-06-01  0:49     ` Lu, Wenzhuo
2017-06-01 11:26       ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=defe25c5-d07b-8141-00f3-deb585d706cb@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=radu.nicolau@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).