All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jay Vosburgh <jay.vosburgh@canonical.com>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Michael Chan <michael.chan@broadcom.com>,
	Ariel Elior <ariel.elior@cavium.com>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	Tariq Toukan <tariqt@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
	Jakub Kicinski <jakub.kicinski@netronome.com>,
	Song Liu <songliubraving@fb.com>,
	Veaceslav Falico <vfalico@gmail.com>,
	Andy Gospodarek <andy@greyhouse.net>
Subject: Re: [PATCH net 02/15] bonding: use netpoll_poll_dev() helper
Date: Sat, 22 Sep 2018 12:23:45 +0200	[thread overview]
Message-ID: <5518.1537611825@nyx> (raw)
In-Reply-To: <20180921222752.101307-3-edumazet@google.com>

Eric Dumazet <edumazet@google.com> wrote:

>We want to allow NAPI drivers to no longer provide
>ndo_poll_controller() method, as it has been proven problematic.
>
>team driver must not look at its presence, but instead call
>netpoll_poll_dev() which factorize the needed actions.

	This patch is for bonding, not team; otherwise LGTM.

Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>

	-J


>Signed-off-by: Eric Dumazet <edumazet@google.com>
>Cc: Jay Vosburgh <j.vosburgh@gmail.com>
>Cc: Veaceslav Falico <vfalico@gmail.com>
>Cc: Andy Gospodarek <andy@greyhouse.net>
>---
> drivers/net/bonding/bond_main.c | 11 ++---------
> 1 file changed, 2 insertions(+), 9 deletions(-)
>
>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>index a764a83f99dabe54585dbad7dba40b6601177c03..0d87e11e7f1d84537fe43d95249b1bd3a2ce291d 100644
>--- a/drivers/net/bonding/bond_main.c
>+++ b/drivers/net/bonding/bond_main.c
>@@ -971,16 +971,13 @@ static void bond_poll_controller(struct net_device *bond_dev)
> 	struct slave *slave = NULL;
> 	struct list_head *iter;
> 	struct ad_info ad_info;
>-	struct netpoll_info *ni;
>-	const struct net_device_ops *ops;
> 
> 	if (BOND_MODE(bond) == BOND_MODE_8023AD)
> 		if (bond_3ad_get_active_agg_info(bond, &ad_info))
> 			return;
> 
> 	bond_for_each_slave_rcu(bond, slave, iter) {
>-		ops = slave->dev->netdev_ops;
>-		if (!bond_slave_is_up(slave) || !ops->ndo_poll_controller)
>+		if (!bond_slave_is_up(slave))
> 			continue;
> 
> 		if (BOND_MODE(bond) == BOND_MODE_8023AD) {
>@@ -992,11 +989,7 @@ static void bond_poll_controller(struct net_device *bond_dev)
> 				continue;
> 		}
> 
>-		ni = rcu_dereference_bh(slave->dev->npinfo);
>-		if (down_trylock(&ni->dev_lock))
>-			continue;
>-		ops->ndo_poll_controller(slave->dev);
>-		up(&ni->dev_lock);
>+		netpoll_poll_dev(slave->dev);
> 	}
> }
> 
>-- 
>2.19.0.444.g18242da7ef-goog
>

  reply	other threads:[~2018-09-22 16:17 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21 22:27 [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers Eric Dumazet
2018-09-21 22:27 ` [PATCH net 01/15] netpoll: make ndo_poll_controller() optional Eric Dumazet
2018-09-21 22:27 ` [PATCH net 02/15] bonding: use netpoll_poll_dev() helper Eric Dumazet
2018-09-22 10:23   ` Jay Vosburgh [this message]
2018-09-21 22:27 ` [PATCH net 03/15] ixgbe: remove ndo_poll_controller Eric Dumazet
2018-09-21 22:27 ` [PATCH net 04/15] ixgbevf: " Eric Dumazet
2018-09-21 22:27 ` [PATCH net 05/15] fm10k: " Eric Dumazet
2018-09-21 22:27 ` [PATCH net 06/15] ixgb: " Eric Dumazet
2018-09-21 22:27 ` [PATCH net 07/15] igb: " Eric Dumazet
2018-09-21 22:27 ` [PATCH net 08/15] ice: " Eric Dumazet
2018-09-21 22:27 ` [PATCH net 09/15] i40evf: " Eric Dumazet
2018-09-21 22:27 ` [PATCH net 10/15] mlx4: " Eric Dumazet
2018-09-21 22:27 ` [PATCH net 11/15] mlx5: " Eric Dumazet
2018-09-21 22:27 ` [PATCH net 12/15] bnx2x: " Eric Dumazet
2018-09-21 22:27 ` [PATCH net 13/15] bnxt: " Eric Dumazet
2018-09-21 22:27 ` [PATCH net 14/15] nfp: " Eric Dumazet
2018-09-21 23:41   ` Jakub Kicinski
2018-09-21 22:27 ` [PATCH net 15/15] tun: " Eric Dumazet
2018-09-23 19:29 ` [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers David Miller
2018-09-23 19:47   ` Eric Dumazet
2018-09-24  5:04 ` David Miller
2018-09-24 15:30   ` Eric Dumazet
2018-09-24 19:30     ` Song Liu
2018-09-24 19:41       ` Eric Dumazet
2018-09-24 20:00         ` Song Liu
2018-09-24 20:56           ` Eric Dumazet
2018-09-24 21:05             ` Eric Dumazet
2018-09-24 21:18               ` Song Liu
2018-09-25 14:02                 ` Michael Chan
2018-09-25 14:20                   ` Eric Dumazet
2018-09-25 14:43                     ` Michael Chan
2018-09-25 18:25                       ` Song Liu
2018-09-25 21:09                         ` Michael Chan
2018-09-25 23:36     ` Song Liu

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=5518.1537611825@nyx \
    --to=jay.vosburgh@canonical.com \
    --cc=andy@greyhouse.net \
    --cc=ariel.elior@cavium.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=songliubraving@fb.com \
    --cc=tariqt@mellanox.com \
    --cc=vfalico@gmail.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.