DPDK patches and discussions
 help / color / mirror / Atom feed
* Re: [dpdk-dev] [PATCH] net/bonding: add ethdev ops function for MTU set
       [not found] <20180104063443.1821-1-sharmila.podury@gmail.com>
@ 2018-01-09 15:32 ` Doherty, Declan
  2018-01-10 20:42   ` Ferruh Yigit
  0 siblings, 1 reply; 5+ messages in thread
From: Doherty, Declan @ 2018-01-09 15:32 UTC (permalink / raw)
  To: Sharmila Podury; +Cc: dev, Sharmila Podury

On 04/01/2018 6:34 AM, Sharmila Podury wrote:
> From: Sharmila Podury <sharmila.podury@att.com>
> 
> Set the MTU for bonding device by calling .mtu_set for all
> the slaves. Set the MTU only if all slaves support .mtu_set,
> and there is no error returned from any slave.
> 
> Signed-off-by: Sharmila Podury <sharmila.podury@att.com>
> ---
>   drivers/net/bonding/rte_eth_bond_pmd.c | 31 ++++++++++++++++++++++++++++++-
>   1 file changed, 30 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
> index fe2328954..183bdbafc 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -2707,6 +2707,34 @@ bond_ethdev_rss_hash_conf_get(struct rte_eth_dev *dev,
>   	return 0;
>   }
>   
> +static int
> +bond_ethdev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
> +{
> +	struct rte_eth_dev *slave_eth_dev;
> +	struct bond_dev_private *internals = dev->data->dev_private;
> +	int ret, i;
> +
> +	rte_spinlock_lock(&internals->lock);
> +
> +	for (i = 0; i < internals->slave_count; i++) {
> +		slave_eth_dev = &rte_eth_devices[internals->slaves[i].port_id];
> +		if (*slave_eth_dev->dev_ops->mtu_set == NULL) {
> +			rte_spinlock_unlock(&internals->lock);
> +			return -ENOTSUP;
> +		}
> +	}
> +	for (i = 0; i < internals->slave_count; i++) {
> +		ret = rte_eth_dev_set_mtu(internals->slaves[i].port_id, mtu);
> +		if (ret < 0) {
> +			rte_spinlock_unlock(&internals->lock);
> +			return ret;
> +		}
> +	}
> +
> +	rte_spinlock_unlock(&internals->lock);
> +	return 0;
> +}
> +
>   const struct eth_dev_ops default_dev_ops = {
>   	.dev_start            = bond_ethdev_start,
>   	.dev_stop             = bond_ethdev_stop,
> @@ -2726,7 +2754,8 @@ const struct eth_dev_ops default_dev_ops = {
>   	.reta_update          = bond_ethdev_rss_reta_update,
>   	.reta_query           = bond_ethdev_rss_reta_query,
>   	.rss_hash_update      = bond_ethdev_rss_hash_update,
> -	.rss_hash_conf_get    = bond_ethdev_rss_hash_conf_get
> +	.rss_hash_conf_get    = bond_ethdev_rss_hash_conf_get,
> +	.mtu_set              = bond_ethdev_mtu_set
>   };
>   
>   static int
> 

Acked-by: Declan Doherty <declan.doherty@intel.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/bonding: add ethdev ops function for MTU set
  2018-01-09 15:32 ` [dpdk-dev] [PATCH] net/bonding: add ethdev ops function for MTU set Doherty, Declan
@ 2018-01-10 20:42   ` Ferruh Yigit
  2018-01-11  3:31     ` Chas Williams
  0 siblings, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2018-01-10 20:42 UTC (permalink / raw)
  To: Doherty, Declan, Sharmila Podury; +Cc: dev, Sharmila Podury

On 1/9/2018 3:32 PM, Doherty, Declan wrote:
> On 04/01/2018 6:34 AM, Sharmila Podury wrote:
>> From: Sharmila Podury <sharmila.podury@att.com>
>>
>> Set the MTU for bonding device by calling .mtu_set for all
>> the slaves. Set the MTU only if all slaves support .mtu_set,
>> and there is no error returned from any slave.
>>
>> Signed-off-by: Sharmila Podury <sharmila.podury@att.com>

> Acked-by: Declan Doherty <declan.doherty@intel.com>
> 

I don't see this patch in both mail list or patchwork, can you please double check?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/bonding: add ethdev ops function for MTU set
  2018-01-10 20:42   ` Ferruh Yigit
@ 2018-01-11  3:31     ` Chas Williams
  0 siblings, 0 replies; 5+ messages in thread
From: Chas Williams @ 2018-01-11  3:31 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Doherty, Declan, Sharmila Podury, dev, Sharmila Podury

I believe it's in the moderation queue because Sharmilla sent it from her
gmail address.  Is there any chance you can look around in there and see if
you can free it?  If not, I will resubmit with the Acked-by.

On Wed, Jan 10, 2018 at 3:42 PM, Ferruh Yigit <ferruh.yigit@intel.com>
wrote:

> On 1/9/2018 3:32 PM, Doherty, Declan wrote:
> > On 04/01/2018 6:34 AM, Sharmila Podury wrote:
> >> From: Sharmila Podury <sharmila.podury@att.com>
> >>
> >> Set the MTU for bonding device by calling .mtu_set for all
> >> the slaves. Set the MTU only if all slaves support .mtu_set,
> >> and there is no error returned from any slave.
> >>
> >> Signed-off-by: Sharmila Podury <sharmila.podury@att.com>
>
> > Acked-by: Declan Doherty <declan.doherty@intel.com>
> >
>
> I don't see this patch in both mail list or patchwork, can you please
> double check?
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/bonding: add ethdev ops function for MTU set
  2018-01-11 19:12 Sharmila Podury
@ 2018-01-11 20:14 ` Ferruh Yigit
  0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2018-01-11 20:14 UTC (permalink / raw)
  To: Sharmila Podury, declan.doherty; +Cc: dev, Sharmila Podury

On 1/11/2018 7:12 PM, Sharmila Podury wrote:
> From: Sharmila Podury <sharmila.podury@att.com>
> 
> Set the MTU for bonding device by calling .mtu_set for all
> the slaves. Set the MTU only if all slaves support .mtu_set,
> and there is no error returned from any slave.
> 
> Signed-off-by: Sharmila Podury <sharmila.podury@att.com>
> Acked-by: Declan Doherty <declan.doherty@intel.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH] net/bonding: add ethdev ops function for MTU set
@ 2018-01-11 19:12 Sharmila Podury
  2018-01-11 20:14 ` Ferruh Yigit
  0 siblings, 1 reply; 5+ messages in thread
From: Sharmila Podury @ 2018-01-11 19:12 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev, Sharmila Podury

From: Sharmila Podury <sharmila.podury@att.com>

Set the MTU for bonding device by calling .mtu_set for all
the slaves. Set the MTU only if all slaves support .mtu_set,
and there is no error returned from any slave.

Signed-off-by: Sharmila Podury <sharmila.podury@att.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index fe2328954..183bdbafc 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2707,6 +2707,34 @@ bond_ethdev_rss_hash_conf_get(struct rte_eth_dev *dev,
 	return 0;
 }
 
+static int
+bond_ethdev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+{
+	struct rte_eth_dev *slave_eth_dev;
+	struct bond_dev_private *internals = dev->data->dev_private;
+	int ret, i;
+
+	rte_spinlock_lock(&internals->lock);
+
+	for (i = 0; i < internals->slave_count; i++) {
+		slave_eth_dev = &rte_eth_devices[internals->slaves[i].port_id];
+		if (*slave_eth_dev->dev_ops->mtu_set == NULL) {
+			rte_spinlock_unlock(&internals->lock);
+			return -ENOTSUP;
+		}
+	}
+	for (i = 0; i < internals->slave_count; i++) {
+		ret = rte_eth_dev_set_mtu(internals->slaves[i].port_id, mtu);
+		if (ret < 0) {
+			rte_spinlock_unlock(&internals->lock);
+			return ret;
+		}
+	}
+
+	rte_spinlock_unlock(&internals->lock);
+	return 0;
+}
+
 const struct eth_dev_ops default_dev_ops = {
 	.dev_start            = bond_ethdev_start,
 	.dev_stop             = bond_ethdev_stop,
@@ -2726,7 +2754,8 @@ const struct eth_dev_ops default_dev_ops = {
 	.reta_update          = bond_ethdev_rss_reta_update,
 	.reta_query           = bond_ethdev_rss_reta_query,
 	.rss_hash_update      = bond_ethdev_rss_hash_update,
-	.rss_hash_conf_get    = bond_ethdev_rss_hash_conf_get
+	.rss_hash_conf_get    = bond_ethdev_rss_hash_conf_get,
+	.mtu_set              = bond_ethdev_mtu_set
 };
 
 static int
-- 
2.11.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-01-11 20:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20180104063443.1821-1-sharmila.podury@gmail.com>
2018-01-09 15:32 ` [dpdk-dev] [PATCH] net/bonding: add ethdev ops function for MTU set Doherty, Declan
2018-01-10 20:42   ` Ferruh Yigit
2018-01-11  3:31     ` Chas Williams
2018-01-11 19:12 Sharmila Podury
2018-01-11 20:14 ` Ferruh Yigit

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).