[dpdk-dev,1/2] net/thunderx: add empty link up/down callbacks

Message ID 1490968669-9161-1-git-send-email-Andriy.Berestovskyy@caviumnetworks.com (mailing list archive)
State Not Applicable, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Andriy Berestovskyy March 31, 2017, 1:57 p.m. UTC
  Some applications and DPDK examples expect link up/down
functionality to be provided.

Signed-off-by: Andriy Berestovskyy <Andriy.Berestovskyy@caviumnetworks.com>
---
 drivers/net/thunderx/nicvf_ethdev.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
  

Comments

Jerin Jacob April 3, 2017, 3:13 p.m. UTC | #1
On Fri, Mar 31, 2017 at 03:57:48PM +0200, Andriy Berestovskyy wrote:
> Some applications and DPDK examples expect link up/down
> functionality to be provided.
> 
> Signed-off-by: Andriy Berestovskyy <Andriy.Berestovskyy@caviumnetworks.com>
> ---
>  drivers/net/thunderx/nicvf_ethdev.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
> index 1060319..984c218 100644
> --- a/drivers/net/thunderx/nicvf_ethdev.c
> +++ b/drivers/net/thunderx/nicvf_ethdev.c
> @@ -1924,11 +1924,25 @@ nicvf_dev_configure(struct rte_eth_dev *dev)
>  	return 0;
>  }
>  
> +static int
> +nicvf_dev_set_link_up(struct rte_eth_dev *dev __rte_unused)
> +{
> +	return 0;
> +}
> +
> +static int
> +nicvf_dev_set_link_down(struct rte_eth_dev *dev __rte_unused)
> +{
> +	return 0;
> +}


Since the VF drivers can't really initiate link_up and link_down and
other VF drivers like i40e VF is not setting this callback. I think, it is
OK keep it as -ENOSUP(which is default).

Since Christain Acked on the fix on the usage of examples/ip_pipeline
application. Probably we are OK without this change.

http://dpdk.org/ml/archives/dev/2017-March/062704.html

Any thought from ethdev maintainers?

> +
>  /* Initialize and register driver with DPDK Application */
>  static const struct eth_dev_ops nicvf_eth_dev_ops = {
>  	.dev_configure            = nicvf_dev_configure,
>  	.dev_start                = nicvf_dev_start,
>  	.dev_stop                 = nicvf_dev_stop,
> +	.dev_set_link_up          = nicvf_dev_set_link_up,
> +	.dev_set_link_down        = nicvf_dev_set_link_down,
>  	.link_update              = nicvf_dev_link_update,
>  	.dev_close                = nicvf_dev_close,
>  	.stats_get                = nicvf_dev_stats_get,
> -- 
> 2.7.4
>
  
Ferruh Yigit April 13, 2017, 11:04 a.m. UTC | #2
On 4/3/2017 4:13 PM, Jerin Jacob wrote:
> On Fri, Mar 31, 2017 at 03:57:48PM +0200, Andriy Berestovskyy wrote:
>> Some applications and DPDK examples expect link up/down
>> functionality to be provided.
>>
>> Signed-off-by: Andriy Berestovskyy <Andriy.Berestovskyy@caviumnetworks.com>
>> ---
>>  drivers/net/thunderx/nicvf_ethdev.c | 14 ++++++++++++++
>>  1 file changed, 14 insertions(+)
>>
>> diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
>> index 1060319..984c218 100644
>> --- a/drivers/net/thunderx/nicvf_ethdev.c
>> +++ b/drivers/net/thunderx/nicvf_ethdev.c
>> @@ -1924,11 +1924,25 @@ nicvf_dev_configure(struct rte_eth_dev *dev)
>>  	return 0;
>>  }
>>  
>> +static int
>> +nicvf_dev_set_link_up(struct rte_eth_dev *dev __rte_unused)
>> +{
>> +	return 0;
>> +}
>> +
>> +static int
>> +nicvf_dev_set_link_down(struct rte_eth_dev *dev __rte_unused)
>> +{
>> +	return 0;
>> +}
> 
> 
> Since the VF drivers can't really initiate link_up and link_down and
> other VF drivers like i40e VF is not setting this callback. I think, it is
> OK keep it as -ENOSUP(which is default).
> 
> Since Christain Acked on the fix on the usage of examples/ip_pipeline
> application. Probably we are OK without this change.

Any update planned to this patch? Should I update this as nack?

> 
> http://dpdk.org/ml/archives/dev/2017-March/062704.html
> 
> Any thought from ethdev maintainers?
> 
>> +
>>  /* Initialize and register driver with DPDK Application */
>>  static const struct eth_dev_ops nicvf_eth_dev_ops = {
>>  	.dev_configure            = nicvf_dev_configure,
>>  	.dev_start                = nicvf_dev_start,
>>  	.dev_stop                 = nicvf_dev_stop,
>> +	.dev_set_link_up          = nicvf_dev_set_link_up,
>> +	.dev_set_link_down        = nicvf_dev_set_link_down,
>>  	.link_update              = nicvf_dev_link_update,
>>  	.dev_close                = nicvf_dev_close,
>>  	.stats_get                = nicvf_dev_stats_get,
>> -- 
>> 2.7.4
>>
  
Jerin Jacob April 14, 2017, 12:37 p.m. UTC | #3
-----Original Message-----
> Date: Thu, 13 Apr 2017 12:04:51 +0100
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> To: Jerin Jacob <jerin.jacob@caviumnetworks.com>, Andriy Berestovskyy
>  <Andriy.Berestovskyy@caviumnetworks.com>
> CC: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>, dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/2] net/thunderx: add empty link up/down
>  callbacks
> User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
>  Thunderbird/52.0
> 
> On 4/3/2017 4:13 PM, Jerin Jacob wrote:
> > On Fri, Mar 31, 2017 at 03:57:48PM +0200, Andriy Berestovskyy wrote:
> >> Some applications and DPDK examples expect link up/down
> >> functionality to be provided.
> >>
> >> Signed-off-by: Andriy Berestovskyy <Andriy.Berestovskyy@caviumnetworks.com>
> >> ---
> >>  drivers/net/thunderx/nicvf_ethdev.c | 14 ++++++++++++++
> >>  1 file changed, 14 insertions(+)
> >>
> >> diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
> >> index 1060319..984c218 100644
> >> --- a/drivers/net/thunderx/nicvf_ethdev.c
> >> +++ b/drivers/net/thunderx/nicvf_ethdev.c
> >> @@ -1924,11 +1924,25 @@ nicvf_dev_configure(struct rte_eth_dev *dev)
> >>  	return 0;
> >>  }
> >>  
> >> +static int
> >> +nicvf_dev_set_link_up(struct rte_eth_dev *dev __rte_unused)
> >> +{
> >> +	return 0;
> >> +}
> >> +
> >> +static int
> >> +nicvf_dev_set_link_down(struct rte_eth_dev *dev __rte_unused)
> >> +{
> >> +	return 0;
> >> +}
> > 
> > 
> > Since the VF drivers can't really initiate link_up and link_down and
> > other VF drivers like i40e VF is not setting this callback. I think, it is
> > OK keep it as -ENOSUP(which is default).
> > 
> > Since Christain Acked on the fix on the usage of examples/ip_pipeline
> > application. Probably we are OK without this change.
> 
> Any update planned to this patch? Should I update this as nack?
> 

You can mark as "Not applicable" in patchwork.
Thanks

> > 
> > http://dpdk.org/ml/archives/dev/2017-March/062704.html
> > 
> > Any thought from ethdev maintainers?
> > 
> >> +
> >>  /* Initialize and register driver with DPDK Application */
> >>  static const struct eth_dev_ops nicvf_eth_dev_ops = {
> >>  	.dev_configure            = nicvf_dev_configure,
> >>  	.dev_start                = nicvf_dev_start,
> >>  	.dev_stop                 = nicvf_dev_stop,
> >> +	.dev_set_link_up          = nicvf_dev_set_link_up,
> >> +	.dev_set_link_down        = nicvf_dev_set_link_down,
> >>  	.link_update              = nicvf_dev_link_update,
> >>  	.dev_close                = nicvf_dev_close,
> >>  	.stats_get                = nicvf_dev_stats_get,
> >> -- 
> >> 2.7.4
> >>
>
  

Patch

diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 1060319..984c218 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -1924,11 +1924,25 @@  nicvf_dev_configure(struct rte_eth_dev *dev)
 	return 0;
 }
 
+static int
+nicvf_dev_set_link_up(struct rte_eth_dev *dev __rte_unused)
+{
+	return 0;
+}
+
+static int
+nicvf_dev_set_link_down(struct rte_eth_dev *dev __rte_unused)
+{
+	return 0;
+}
+
 /* Initialize and register driver with DPDK Application */
 static const struct eth_dev_ops nicvf_eth_dev_ops = {
 	.dev_configure            = nicvf_dev_configure,
 	.dev_start                = nicvf_dev_start,
 	.dev_stop                 = nicvf_dev_stop,
+	.dev_set_link_up          = nicvf_dev_set_link_up,
+	.dev_set_link_down        = nicvf_dev_set_link_down,
 	.link_update              = nicvf_dev_link_update,
 	.dev_close                = nicvf_dev_close,
 	.stats_get                = nicvf_dev_stats_get,