
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