lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230607072234.5svu7wo3z5p76kpr@DEN-LT-70577>
Date: Wed, 7 Jun 2023 07:22:34 +0000
From: Daniel Machon <daniel.machon@...rochip.com>
To: "Ertman, David M" <david.m.ertman@...el.com>
CC: "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net v2 04/10] ice: implement lag netdev event handler

> > > The event handler for LAG will create a work item to place on the ordered
> > > workqueue to be processed.
> > >
> > > Add in defines for training packets and new recipes to be used by the
> > > switching block of the HW for LAG packet steering.
> > >
> > > Update the ice_lag struct to reflect the new processing methodology.
> > >
> > > Signed-off-by: Dave Ertman <david.m.ertman@...el.com>
> > > ---
> > >  drivers/net/ethernet/intel/ice/ice_lag.c      | 125 ++++++++++++++++--
> > >  drivers/net/ethernet/intel/ice/ice_lag.h      |  31 ++++-
> > >  drivers/net/ethernet/intel/ice/ice_virtchnl.c |   2 +
> > >  3 files changed, 144 insertions(+), 14 deletions(-)
> 
> 
> > > +       lag_work = kzalloc(sizeof(*lag_work), GFP_KERNEL);
> > > +       if (!lag_work)
> > > +               return -ENOMEM;
> > > +
> > > +       lag_work->event_netdev = netdev;
> > > +       lag_work->lag = lag;
> > > +       lag_work->event = event;
> > > +       if (event == NETDEV_CHANGEUPPER) {
> > > +               struct netdev_notifier_changeupper_info *info;
> > > +
> > > +               info = ptr;
> > > +               upper_netdev = info->upper_dev;
> > > +       } else {
> > > +               upper_netdev = netdev_master_upper_dev_get(netdev);
> > > +       }
> > > +
> > > +       INIT_LIST_HEAD(&lag_work->netdev_list.node);
> > > +       if (upper_netdev) {
> > > +               struct ice_lag_netdev_list *nd_list;
> > > +               struct net_device *tmp_nd;
> > > +
> > > +               rcu_read_lock();
> > > +               for_each_netdev_in_bond_rcu(upper_netdev, tmp_nd) {
> > > +                       nd_list = kzalloc(sizeof(*nd_list), GFP_KERNEL);
> > > +                       if (!nd_list)
> > > +                               break;
> >
> > Further up, -ENOMEM is returned in case kzalloc fails. Here the error is
> > silently ignored - is this correct? :)
> 
> The lag_work above is the container struct that needs to be present for any work
> to be done for the event.  But, as the list of elements of the bond gets built, if a single element is
> not present, it is still possible for the event to be evaluated.  There could be the issue of
> complete functionality if the wrong element is missing, but that will be handled in the processing
> of the specific event.

Ah I see. Thank you for explaining.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ