[dpdk-stable] patch 'net: explicit cast of multicast bit clearing' has been queued to stable release 18.02.2

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed May 23 14:09:28 CEST 2018


Hi,

FYI, your patch has been queued to stable release 18.02.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/25/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 7fe415ff0cb92c03b4989e10035997abbe69a674 Mon Sep 17 00:00:00 2001
From: Andy Green <andy at warmcat.com>
Date: Thu, 17 May 2018 21:49:47 +0800
Subject: [PATCH] net: explicit cast of multicast bit clearing

[ upstream commit beb4076567441bb6f936f99f442c2a8de911bb3c ]

GCC 8.1 warned:

rte_ether.h:213:13:
warning: conversion from 'int' to 'uint8_t'
{aka 'unsigned char'} may change value [-Wconversion]
  addr[0] &= ~ETHER_GROUP_ADDR;

Fixes: 7ef007291004 ("ethdev: random MAC address")

Signed-off-by: Andy Green <andy at warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 lib/librte_net/rte_ether.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_net/rte_ether.h b/lib/librte_net/rte_ether.h
index 16dddb388..6cd822950 100644
--- a/lib/librte_net/rte_ether.h
+++ b/lib/librte_net/rte_ether.h
@@ -210,7 +210,7 @@ static inline void eth_random_addr(uint8_t *addr)
 	uint8_t *p = (uint8_t *)&rand;
 
 	rte_memcpy(addr, p, ETHER_ADDR_LEN);
-	addr[0] &= ~ETHER_GROUP_ADDR;       /* clear multicast bit */
+	addr[0] &= (uint8_t)~ETHER_GROUP_ADDR;       /* clear multicast bit */
 	addr[0] |= ETHER_LOCAL_ADMIN_ADDR;  /* set local assignment bit */
 }
 
-- 
2.14.2



More information about the stable mailing list