Re: [libvirt PATCH 13/23] interface: remove most use of the term 'slave' from bonding code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 19, 2020 at 12:25:49PM +0200, Peter Krempa wrote:
> On Fri, Jun 19, 2020 at 10:32:50 +0100, Daniel Berrange wrote:
> > We can't change the filenames used in sysfs, but we don't have
> > to use that terminology in our code processing the list of NICs.
> > 
> > Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
> > ---
> >  docs/schemas/interface.rng             |  2 +-
> >  src/interface/interface_backend_udev.c | 43 ++++++++++++--------------
> >  2 files changed, 21 insertions(+), 24 deletions(-)
> > 
> > diff --git a/docs/schemas/interface.rng b/docs/schemas/interface.rng
> > index a4fddaaedc..2530077190 100644
> > --- a/docs/schemas/interface.rng
> > +++ b/docs/schemas/interface.rng
> > @@ -237,7 +237,7 @@
> >          </optional>
> >  
> >          <oneOrMore>
> > -          <!-- The slave interfaces -->
> > +          <!-- The attached interfaces -->
> >            <ref name="bare-ethernet-interface"/>
> >          </oneOrMore>
> >        </interleave>
> > diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c
> > index f0594aa59c..f5961a93df 100644
> > --- a/src/interface/interface_backend_udev.c
> > +++ b/src/interface/interface_backend_udev.c
> > @@ -546,9 +546,7 @@ static int
> >  udevBondScanDirFilter(const struct dirent *entry)
> >  {
> >      /* This is ugly so if anyone has a better suggestion, please improve
> > -     * this. Unfortunately the kernel stores everything in the top level
> > -     * interface sysfs entry and references the slaves as slave_eth0 for
> > -     * example.
> > +     * this.
> >       */
> >      if (STRPREFIX(entry->d_name, BOND_NIC_PREFIX))
> >          return 1;
> > @@ -591,8 +589,8 @@ udevGetIfaceDefBond(struct udev *udev,
> >                      const char *name,
> >                      virInterfaceDef *ifacedef)
> >  {
> > -    struct dirent **slave_list = NULL;
> > -    int slave_count = 0;
> > +    struct dirent **nic_list = NULL;
> > +    int nic_count = 0;
> 
> Patch ordering problem with previous one?

Opps, yes, will fix.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux