[libvirt] [PATCHv2] nodedev: Fix gfeature size to be according to running kernel

Ján Tomko jtomko at redhat.com
Fri Aug 14 08:18:35 UTC 2015


On Thu, Aug 13, 2015 at 10:41:19AM -0400, John Ferlan wrote:
> 
> 
> On 08/13/2015 06:23 AM, Moshe Levi wrote:
> > This patch add virNetDevGetGFeaturesSize to get the supported
> > gfeature size from the kernel
> > ---
> >  src/util/virnetdev.c |   79 ++++++++++++++++++++++++++++++++++++++++++++-----
> >  1 files changed, 71 insertions(+), 8 deletions(-)
> > 
> > diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
> > index 2f3690e..582efda 100644
> > --- a/src/util/virnetdev.c
> > +++ b/src/util/virnetdev.c
> > @@ -90,7 +90,8 @@ VIR_LOG_INIT("util.netdev");
> >  #define RESOURCE_FILE_LEN 4096
> >  #if HAVE_DECL_ETHTOOL_GFEATURES
> >  # define TX_UDP_TNL 25
> > -# define GFEATURES_SIZE 2
> > +# define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
> 
> Maybe we should follow the convention laine noted in one of his earlier
> patches and use "GDIV_ROUND_UP" and "GFEATURE_BITS..."... Although
> perhaps DIV_ROUND_UP seems superfluous if it's only used once.
> 

We already have VIR_DIV_UP defined in internal.h

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150814/eeed3105/attachment-0001.sig>


More information about the libvir-list mailing list