[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MW5PR11MB58118605A1284B8E08A783D9DD5CA@MW5PR11MB5811.namprd11.prod.outlook.com>
Date: Tue, 20 Jun 2023 16:07:55 +0000
From: "Ertman, David M" <david.m.ertman@...el.com>
To: "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "bcreeley@....com"
<bcreeley@....com>, "daniel.machon@...rochip.com"
<daniel.machon@...rochip.com>, "simon.horman@...igine.com"
<simon.horman@...igine.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next v5 06/10] ice: Flesh out
implementation of support for SRIOV on bonded interface
> -----Original Message-----
> From: Nguyen, Anthony L <anthony.l.nguyen@...el.com>
> Sent: Friday, June 16, 2023 1:56 PM
> To: Ertman, David M <david.m.ertman@...el.com>; intel-wired-
> lan@...ts.osuosl.org
> Cc: netdev@...r.kernel.org; bcreeley@....com;
> daniel.machon@...rochip.com; simon.horman@...igine.com
> Subject: Re: [Intel-wired-lan] [PATCH iwl-next v5 06/10] ice: Flesh out
> implementation of support for SRIOV on bonded interface
>
> On 6/15/2023 9:29 AM, Dave Ertman wrote:
>
> ...
>
> > /**
> > @@ -622,6 +1324,69 @@ static void ice_lag_monitor_active(struct ice_lag
> *lag, void *ptr)
> > static bool
> > ice_lag_chk_comp(struct ice_lag *lag, void *ptr)
> > {
> > + struct net_device *event_netdev, *event_upper;
> > + struct netdev_notifier_bonding_info *info;
> > + struct netdev_bonding_info *bonding_info;
> > + struct list_head *tmp;
> > + int count = 0;
> > +
> > + if (!lag->primary)
> > + return true;
> > +
> > + event_netdev = netdev_notifier_info_to_dev(ptr);
> > + rcu_read_lock();
> > + event_upper =
> netdev_master_upper_dev_get_rcu(event_netdev);
> > + rcu_read_unlock();
> > + if (event_upper != lag->upper_netdev)
> > + return true;
> > +
> > + info = (struct netdev_notifier_bonding_info *)ptr;
> > + bonding_info = &info->bonding_info;
> > + lag->bond_mode = bonding_info->master.bond_mode;
> > + if (lag->bond_mode != BOND_MODE_ACTIVEBACKUP) {
> > + netdev_info(lag->netdev, "Bond Mode not ACTIVE-
> BACKUP\n");
> > + return false;
> > + }
> > +
> > + list_for_each(tmp, lag->netdev_head) {
> > + struct ice_dcbx_cfg *dcb_cfg, *peer_dcb_cfg;
> > + struct ice_lag_netdev_list *entry;
> > + struct ice_netdev_priv *peer_np;
> > + struct net_device *peer_netdev;
> > + struct ice_vsi *vsi, *peer_vsi;
> > +
> > + entry = list_entry(tmp, struct ice_lag_netdev_list, node);
> > + peer_netdev = entry->netdev;
> > + if (!netif_is_ice(peer_netdev)) {
> > + netdev_info(lag->netdev, "Found non-ice netdev in
> LAG\n");
> > + return false;
> > + }
> > +
> > + count++;
> > + if (count > 2) {
> > + netdev_info(lag->netdev, "Found more than two
> netdevs in LAG\n");
> > + return false;
> > + }
> > +
> > + peer_np = netdev_priv(peer_netdev);
> > + vsi = ice_get_main_vsi(lag->pf);
> > + peer_vsi = peer_np->vsi;
> > + if (lag->pf->pdev->bus != peer_vsi->back->pdev->bus ||
> > + lag->pf->pdev->slot != peer_vsi->back->pdev->slot) {
> > + netdev_info(lag->netdev, "Found netdev on
> different device in LAG\n");
> > + return false;
> > + }
> > +
> > + dcb_cfg = &vsi->port_info->qos_cfg.local_dcbx_cfg;
> > + peer_dcb_cfg = &peer_vsi->port_info-
> >qos_cfg.local_dcbx_cfg;
> > + if (memcmp(dcb_cfg, peer_dcb_cfg,
> > + sizeof(struct ice_dcbx_cfg))) {
> > + netdev_info(lag->netdev, "Found netdev with
> different DCB config in LAG\n");
> > + return false;
> > + }
> > +
> > + }
>
> As you have to respin anyways...
>
> CHECK: Blank lines aren't necessary before a close brace '}'
> #893: FILE: drivers/net/ethernet/intel/ice/ice_lag.c:1388:
Fixed
> +
> + }
Powered by blists - more mailing lists