From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jay Vosburgh Subject: Re: [PATCH net 02/15] bonding: use netpoll_poll_dev() helper Date: Sat, 22 Sep 2018 12:23:45 +0200 Message-ID: <5518.1537611825@nyx> References: <20180921222752.101307-1-edumazet@google.com> <20180921222752.101307-3-edumazet@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Cc: "David S . Miller" , netdev , Michael Chan , Ariel Elior , Eric Dumazet , Tariq Toukan , Saeed Mahameed , Jeff Kirsher , Jakub Kicinski , Song Liu , Veaceslav Falico , Andy Gospodarek To: Eric Dumazet Return-path: Received: from youngberry.canonical.com ([91.189.89.112]:33996 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726004AbeIVQRB (ORCPT ); Sat, 22 Sep 2018 12:17:01 -0400 In-reply-to: <20180921222752.101307-3-edumazet@google.com> Content-ID: <5517.1537611825.1@nyx> Sender: netdev-owner@vger.kernel.org List-ID: Eric Dumazet 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 -J >Signed-off-by: Eric Dumazet >Cc: Jay Vosburgh >Cc: Veaceslav Falico >Cc: Andy Gospodarek >--- > 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 >