All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch net-next] team: refine IFF_XMIT_DST_RELEASE capability
@ 2012-07-18 17:39 Jiri Pirko
  2012-07-18 18:17 ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Pirko @ 2012-07-18 17:39 UTC (permalink / raw)
  To: netdev; +Cc: davem, edumazet

Cloned patch of Eric Dumazet for bonding.

Some workloads greatly benefit of IFF_XMIT_DST_RELEASE capability
on output net device, avoiding dirtying dst refcount.

team currently disables IFF_XMIT_DST_RELEASE unconditionally.

If all ports have the IFF_XMIT_DST_RELEASE bit set, then
team dev can also have it in its priv_flags.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 drivers/net/team/team.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 1a13470..813e131 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -733,12 +733,14 @@ static void __team_compute_features(struct team *team)
 	struct team_port *port;
 	u32 vlan_features = TEAM_VLAN_FEATURES;
 	unsigned short max_hard_header_len = ETH_HLEN;
+	unsigned int flags, dst_release_flag = IFF_XMIT_DST_RELEASE;
 
 	list_for_each_entry(port, &team->port_list, list) {
 		vlan_features = netdev_increment_features(vlan_features,
 					port->dev->vlan_features,
 					TEAM_VLAN_FEATURES);
 
+		dst_release_flag &= port->dev->priv_flags;
 		if (port->dev->hard_header_len > max_hard_header_len)
 			max_hard_header_len = port->dev->hard_header_len;
 	}
@@ -746,6 +748,9 @@ static void __team_compute_features(struct team *team)
 	team->dev->vlan_features = vlan_features;
 	team->dev->hard_header_len = max_hard_header_len;
 
+	flags = team->dev->priv_flags & ~IFF_XMIT_DST_RELEASE;
+	team->dev->priv_flags = flags | dst_release_flag;
+
 	netdev_change_features(team->dev);
 }
 
-- 
1.7.10.4

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

* Re: [patch net-next] team: refine IFF_XMIT_DST_RELEASE capability
  2012-07-18 17:39 [patch net-next] team: refine IFF_XMIT_DST_RELEASE capability Jiri Pirko
@ 2012-07-18 18:17 ` Eric Dumazet
  2012-07-18 18:28   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2012-07-18 18:17 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev, davem, edumazet

On Wed, 2012-07-18 at 19:39 +0200, Jiri Pirko wrote:
> Cloned patch of Eric Dumazet for bonding.
> 
> Some workloads greatly benefit of IFF_XMIT_DST_RELEASE capability
> on output net device, avoiding dirtying dst refcount.
> 
> team currently disables IFF_XMIT_DST_RELEASE unconditionally.
> 
> If all ports have the IFF_XMIT_DST_RELEASE bit set, then
> team dev can also have it in its priv_flags.
> 
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
> ---
>  drivers/net/team/team.c |    5 +++++
>  1 file changed, 5 insertions(+)

Acked-by: Eric Dumazet <edumazet@google.com>

Thanks

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

* Re: [patch net-next] team: refine IFF_XMIT_DST_RELEASE capability
  2012-07-18 18:17 ` Eric Dumazet
@ 2012-07-18 18:28   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2012-07-18 18:28 UTC (permalink / raw)
  To: eric.dumazet; +Cc: jiri, netdev, edumazet

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 18 Jul 2012 20:17:34 +0200

> On Wed, 2012-07-18 at 19:39 +0200, Jiri Pirko wrote:
>> Cloned patch of Eric Dumazet for bonding.
>> 
>> Some workloads greatly benefit of IFF_XMIT_DST_RELEASE capability
>> on output net device, avoiding dirtying dst refcount.
>> 
>> team currently disables IFF_XMIT_DST_RELEASE unconditionally.
>> 
>> If all ports have the IFF_XMIT_DST_RELEASE bit set, then
>> team dev can also have it in its priv_flags.
>> 
>> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
>> ---
>>  drivers/net/team/team.c |    5 +++++
>>  1 file changed, 5 insertions(+)
> 
> Acked-by: Eric Dumazet <edumazet@google.com>

Applied, thanks.

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

end of thread, other threads:[~2012-07-18 18:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-18 17:39 [patch net-next] team: refine IFF_XMIT_DST_RELEASE capability Jiri Pirko
2012-07-18 18:17 ` Eric Dumazet
2012-07-18 18:28   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.