netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next] bridge: Add ability to enable TSO
@ 2015-01-09  5:16 Toshiaki Makita
  2015-01-09  5:44 ` Pankaj Gupta
  2015-01-12 21:18 ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Toshiaki Makita @ 2015-01-09  5:16 UTC (permalink / raw)
  To: David S . Miller, Stephen Hemminger; +Cc: netdev, bridge

Currently a bridge device turns off TSO feature if no bridge ports
support it. We can always enable it, since packets can be segmented on
ports by software as well as on the bridge device.
This will reduce the number of packets processed in the bridge.

Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
---
v2: Use an existing helper function.

 net/bridge/br_if.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index ed307db..81e49fb 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -424,6 +424,7 @@ netdev_features_t br_features_recompute(struct net_bridge *br,
 		features = netdev_increment_features(features,
 						     p->dev->features, mask);
 	}
+	features = netdev_add_tso_features(features, mask);
 
 	return features;
 }
-- 
1.8.1.2

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

* Re: [PATCH v2 net-next] bridge: Add ability to enable TSO
  2015-01-09  5:16 [PATCH v2 net-next] bridge: Add ability to enable TSO Toshiaki Makita
@ 2015-01-09  5:44 ` Pankaj Gupta
  2015-01-09  6:22   ` Toshiaki Makita
  2015-01-12 21:18 ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Pankaj Gupta @ 2015-01-09  5:44 UTC (permalink / raw)
  To: Toshiaki Makita; +Cc: David S . Miller, Stephen Hemminger, netdev, bridge


> 
> Currently a bridge device turns off TSO feature if no bridge ports
> support it. We can always enable it, since packets can be segmented on
> ports by software as well as on the bridge device.
> This will reduce the number of packets processed in the bridge.
> 
> Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
> ---
> v2: Use an existing helper function.
> 
>  net/bridge/br_if.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
> index ed307db..81e49fb 100644
> --- a/net/bridge/br_if.c
> +++ b/net/bridge/br_if.c
> @@ -424,6 +424,7 @@ netdev_features_t br_features_recompute(struct net_bridge
> *br,
>  		features = netdev_increment_features(features,
>  						     p->dev->features, mask);
>  	}
> +	features = netdev_add_tso_features(features, mask);

Just a doubt. Are we inducing latency if source has traffic at very low rate.
I mean by default do we need it?

>  
>  	return features;
>  }
> --
> 1.8.1.2
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH v2 net-next] bridge: Add ability to enable TSO
  2015-01-09  5:44 ` Pankaj Gupta
@ 2015-01-09  6:22   ` Toshiaki Makita
  2015-01-09 19:10     ` Pankaj Gupta
  0 siblings, 1 reply; 5+ messages in thread
From: Toshiaki Makita @ 2015-01-09  6:22 UTC (permalink / raw)
  To: Pankaj Gupta; +Cc: netdev, bridge, David S . Miller

On 2015/01/09 14:44, Pankaj Gupta wrote:
> 
>>
>> Currently a bridge device turns off TSO feature if no bridge ports
>> support it. We can always enable it, since packets can be segmented on
>> ports by software as well as on the bridge device.
>> This will reduce the number of packets processed in the bridge.
>>
>> Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
>> ---
>> v2: Use an existing helper function.
>>
>>  net/bridge/br_if.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
>> index ed307db..81e49fb 100644
>> --- a/net/bridge/br_if.c
>> +++ b/net/bridge/br_if.c
>> @@ -424,6 +424,7 @@ netdev_features_t br_features_recompute(struct net_bridge
>> *br,
>>  		features = netdev_increment_features(features,
>>  						     p->dev->features, mask);
>>  	}
>> +	features = netdev_add_tso_features(features, mask);
> 
> Just a doubt. Are we inducing latency if source has traffic at very low rate.
> I mean by default do we need it?

Is your concern tcp_tso_should_defer() in tcp_write_xmit()?
If so, since TSO packet is created by GSO even without this patch, this
should not increase latency there.
This patch just delays the point of software segmentation from the
bridge device to its port.

Thanks,
Toshiaki Makita

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

* Re: [PATCH v2 net-next] bridge: Add ability to enable TSO
  2015-01-09  6:22   ` Toshiaki Makita
@ 2015-01-09 19:10     ` Pankaj Gupta
  0 siblings, 0 replies; 5+ messages in thread
From: Pankaj Gupta @ 2015-01-09 19:10 UTC (permalink / raw)
  To: Toshiaki Makita; +Cc: David S . Miller, Stephen Hemminger, netdev, bridge


> > 
> >>
> >> Currently a bridge device turns off TSO feature if no bridge ports
> >> support it. We can always enable it, since packets can be segmented on
> >> ports by software as well as on the bridge device.
> >> This will reduce the number of packets processed in the bridge.
> >>
> >> Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
> >> ---
> >> v2: Use an existing helper function.
> >>
> >>  net/bridge/br_if.c | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
> >> index ed307db..81e49fb 100644
> >> --- a/net/bridge/br_if.c
> >> +++ b/net/bridge/br_if.c
> >> @@ -424,6 +424,7 @@ netdev_features_t br_features_recompute(struct
> >> net_bridge
> >> *br,
> >>  		features = netdev_increment_features(features,
> >>  						     p->dev->features, mask);
> >>  	}
> >> +	features = netdev_add_tso_features(features, mask);
> > 
> > Just a doubt. Are we inducing latency if source has traffic at very low
> > rate.
> > I mean by default do we need it?
> 
> Is your concern tcp_tso_should_defer() in tcp_write_xmit()?
yes.

> If so, since TSO packet is created by GSO even without this patch, this
> should not increase latency there.
> This patch just delays the point of software segmentation from the
> bridge device to its port.

I think now I got your point. 

Thanks,
Pankaj
> 
> Thanks,
> Toshiaki Makita
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH v2 net-next] bridge: Add ability to enable TSO
  2015-01-09  5:16 [PATCH v2 net-next] bridge: Add ability to enable TSO Toshiaki Makita
  2015-01-09  5:44 ` Pankaj Gupta
@ 2015-01-12 21:18 ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2015-01-12 21:18 UTC (permalink / raw)
  To: makita.toshiaki; +Cc: netdev, bridge

From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Date: Fri,  9 Jan 2015 14:16:40 +0900

> Currently a bridge device turns off TSO feature if no bridge ports
> support it. We can always enable it, since packets can be segmented on
> ports by software as well as on the bridge device.
> This will reduce the number of packets processed in the bridge.
> 
> Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
> ---
> v2: Use an existing helper function.

Applied, thank you.

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

end of thread, other threads:[~2015-01-12 21:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-09  5:16 [PATCH v2 net-next] bridge: Add ability to enable TSO Toshiaki Makita
2015-01-09  5:44 ` Pankaj Gupta
2015-01-09  6:22   ` Toshiaki Makita
2015-01-09 19:10     ` Pankaj Gupta
2015-01-12 21:18 ` David Miller

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