* [Bridge] [PATCH net-next] bridge: Add ability to always enable TSO/UFO [not found] <1418179394-4470-1-git-send-email-makita.toshiaki@lab.ntt.co.jp> @ 2014-12-10 2:43 ` Toshiaki Makita 2014-12-10 19:50 ` David Miller 0 siblings, 1 reply; 5+ messages in thread From: Toshiaki Makita @ 2014-12-10 2:43 UTC (permalink / raw) To: David S . Miller, Stephen Hemminger; +Cc: netdev, bridge Currently a bridge device turns off TSO/UFO features if no bridge ports support it. We can always enable them, 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> --- net/bridge/br_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index ed307db..e93bf17 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c @@ -418,7 +418,7 @@ netdev_features_t br_features_recompute(struct net_bridge *br, return features; mask = features; - features &= ~NETIF_F_ONE_FOR_ALL; + features &= ~NETIF_F_ONE_FOR_ALL | NETIF_F_GSO_SOFTWARE; list_for_each_entry(p, &br->port_list, list) { features = netdev_increment_features(features, -- 1.8.1.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Bridge] [PATCH net-next] bridge: Add ability to always enable TSO/UFO 2014-12-10 2:43 ` [Bridge] [PATCH net-next] bridge: Add ability to always enable TSO/UFO Toshiaki Makita @ 2014-12-10 19:50 ` David Miller 2014-12-11 2:04 ` Toshiaki Makita 0 siblings, 1 reply; 5+ messages in thread From: David Miller @ 2014-12-10 19:50 UTC (permalink / raw) To: makita.toshiaki; +Cc: netdev, bridge From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> Date: Wed, 10 Dec 2014 11:43:14 +0900 > - features &= ~NETIF_F_ONE_FOR_ALL; > + features &= ~NETIF_F_ONE_FOR_ALL | NETIF_F_GSO_SOFTWARE; I don't think this is the expression you intend to use. I think you meant: features &= ~(NETIF_F_ONE_FOR_ALL | NETIF_F_GSO_SOFTWARE); Or: features = ~NETIF_F_ONE_FOR_ALL; features |= NETIF_F_GSO_SOFTWARE; ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bridge] [PATCH net-next] bridge: Add ability to always enable TSO/UFO 2014-12-10 19:50 ` David Miller @ 2014-12-11 2:04 ` Toshiaki Makita 2014-12-11 2:13 ` David Miller 0 siblings, 1 reply; 5+ messages in thread From: Toshiaki Makita @ 2014-12-11 2:04 UTC (permalink / raw) To: David Miller; +Cc: netdev, bridge On 2014/12/11 4:50, David Miller wrote: > From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> > Date: Wed, 10 Dec 2014 11:43:14 +0900 > >> - features &= ~NETIF_F_ONE_FOR_ALL; >> + features &= ~NETIF_F_ONE_FOR_ALL | NETIF_F_GSO_SOFTWARE; > > I don't think this is the expression you intend to use. Thank you, but this is really my intended expression. "features &= ~NETIF_F_ONE_FOR_ALL" drops all of ONE_FOR_ALL bits including GSO_SOFTWARE. But I want to leave GSO_SOFTWARE bits here. > > I think you meant: > > features &= ~(NETIF_F_ONE_FOR_ALL | NETIF_F_GSO_SOFTWARE); ONE_FOR_ALL already includes GSO_SOFTWARE. > > Or: > > features = ~NETIF_F_ONE_FOR_ALL; > features |= NETIF_F_GSO_SOFTWARE; This way, users cannot drop TSO/UFO by ethtool. Thanks, Toshiaki Makita ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bridge] [PATCH net-next] bridge: Add ability to always enable TSO/UFO 2014-12-11 2:04 ` Toshiaki Makita @ 2014-12-11 2:13 ` David Miller 2014-12-11 2:20 ` Toshiaki Makita 0 siblings, 1 reply; 5+ messages in thread From: David Miller @ 2014-12-11 2:13 UTC (permalink / raw) To: makita.toshiaki; +Cc: netdev, bridge From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> Date: Thu, 11 Dec 2014 11:04:44 +0900 > On 2014/12/11 4:50, David Miller wrote: >> From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> >> Date: Wed, 10 Dec 2014 11:43:14 +0900 >> >>> - features &= ~NETIF_F_ONE_FOR_ALL; >>> + features &= ~NETIF_F_ONE_FOR_ALL | NETIF_F_GSO_SOFTWARE; >> >> I don't think this is the expression you intend to use. > > Thank you, but this is really my intended expression. > > "features &= ~NETIF_F_ONE_FOR_ALL" drops all of ONE_FOR_ALL bits > including GSO_SOFTWARE. > But I want to leave GSO_SOFTWARE bits here. It is clearer to say this as: ~(NETIF_F_ONE_FOR_ALL & ~NETIF_F_GSO_SOFTWARE) Or create a new NETIF_F_* macro to express this idea succinctly. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bridge] [PATCH net-next] bridge: Add ability to always enable TSO/UFO 2014-12-11 2:13 ` David Miller @ 2014-12-11 2:20 ` Toshiaki Makita 0 siblings, 0 replies; 5+ messages in thread From: Toshiaki Makita @ 2014-12-11 2:20 UTC (permalink / raw) To: David Miller; +Cc: netdev, bridge On 2014/12/11 11:13, David Miller wrote: > From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> > Date: Thu, 11 Dec 2014 11:04:44 +0900 > >> On 2014/12/11 4:50, David Miller wrote: >>> From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> >>> Date: Wed, 10 Dec 2014 11:43:14 +0900 >>> >>>> - features &= ~NETIF_F_ONE_FOR_ALL; >>>> + features &= ~NETIF_F_ONE_FOR_ALL | NETIF_F_GSO_SOFTWARE; >>> >>> I don't think this is the expression you intend to use. >> >> Thank you, but this is really my intended expression. >> >> "features &= ~NETIF_F_ONE_FOR_ALL" drops all of ONE_FOR_ALL bits >> including GSO_SOFTWARE. >> But I want to leave GSO_SOFTWARE bits here. > > It is clearer to say this as: > > ~(NETIF_F_ONE_FOR_ALL & ~NETIF_F_GSO_SOFTWARE) > > Or create a new NETIF_F_* macro to express this idea succinctly. OK, I will. (once net-next is reopened) Thanks, Toshiaki Makita ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-12-11 2:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1418179394-4470-1-git-send-email-makita.toshiaki@lab.ntt.co.jp>
2014-12-10 2:43 ` [Bridge] [PATCH net-next] bridge: Add ability to always enable TSO/UFO Toshiaki Makita
2014-12-10 19:50 ` David Miller
2014-12-11 2:04 ` Toshiaki Makita
2014-12-11 2:13 ` David Miller
2014-12-11 2:20 ` Toshiaki Makita
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox