From: Stephen Hemminger <shemminger@vyatta.com>
To: Amerigo Wang <amwang@redhat.com>
Cc: linux-kernel@vger.kernel.org, Jiri Pirko <jpirko@redhat.com>,
Neil Horman <nhorman@redhat.com>,
netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Herbert Xu <herbert@gondor.hengli.com.au>,
bonding-devel@lists.sourceforge.net,
Jay Vosburgh <fubar@us.ibm.com>
Subject: Re: [v2 PATCH 1/2] bonding: sync netpoll code with bridge
Date: Thu, 2 Dec 2010 10:36:50 -0800 [thread overview]
Message-ID: <20101202103650.06647704@nehalam> (raw)
In-Reply-To: <20101202134041.6073.5201.sendpatchset@localhost.localdomain>
On Thu, 2 Dec 2010 08:35:42 -0500
Amerigo Wang <amwang@redhat.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
--
next prev parent reply other threads:[~2010-12-02 18:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-02 13:35 [v2 PATCH 1/2] bonding: sync netpoll code with bridge Amerigo Wang
2010-12-02 13:35 ` [v2 PATCH 2/2] netpoll: remove IFF_IN_NETPOLL flag Amerigo Wang
2010-12-02 18:36 ` Stephen Hemminger [this message]
2010-12-03 2:13 ` [v2 PATCH 1/2] bonding: sync netpoll code with bridge Cong Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101202103650.06647704@nehalam \
--to=shemminger@vyatta.com \
--cc=amwang@redhat.com \
--cc=bonding-devel@lists.sourceforge.net \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=fubar@us.ibm.com \
--cc=herbert@gondor.hengli.com.au \
--cc=jpirko@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.