[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4CF85238.7010508@redhat.com>
Date: Fri, 03 Dec 2010 10:13:12 +0800
From: Cong Wang <amwang@...hat.com>
To: Stephen Hemminger <shemminger@...tta.com>
CC: linux-kernel@...r.kernel.org, Jiri Pirko <jpirko@...hat.com>,
Neil Horman <nhorman@...hat.com>, netdev@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Herbert Xu <herbert@...dor.hengli.com.au>,
bonding-devel@...ts.sourceforge.net,
Jay Vosburgh <fubar@...ibm.com>
Subject: Re: [v2 PATCH 1/2] bonding: sync netpoll code with bridge
On 12/03/10 02:36, Stephen Hemminger wrote:
> On Thu, 2 Dec 2010 08:35:42 -0500
> Amerigo Wang<amwang@...hat.com> wrote:
>
>> #ifdef CONFIG_NET_POLL_CONTROLLER
>> - if (unlikely(bond->dev->priv_flags& IFF_IN_NETPOLL)) {
>> - struct netpoll *np = bond->dev->npinfo->netpoll;
>> - slave_dev->npinfo = bond->dev->npinfo;
>> + if (unlikely(netpoll_tx_running(slave_dev))) {
>> slave_dev->priv_flags |= IFF_IN_NETPOLL;
>> - netpoll_send_skb_on_dev(np, skb, slave_dev);
>> + bond_netpoll_send_skb(bond_get_slave_by_dev(bond, slave_dev), skb);
>> slave_dev->priv_flags&= ~IFF_IN_NETPOLL;
>> } else
>> #endif
>
> Couldn't you eliminate #ifdef by putting the following into header file.
>
> #ifdef CONFIG_NET_POLL_CONTROLLER
> static inline netpoll_tx_running
> ...
> #else
> #define netpoll_tx_running(dev) (0)
> #endif
>
Oh, nice idea! Will change this in the next update.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists