aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-02-06 19:01:28 +0100
committerFlorin Coras <florin.coras@gmail.com>2018-02-06 20:15:56 +0000
commit547ecf631e0d9a7f556cac6462e2e79d49a91a27 (patch)
tree37180014bc3b83bb83306cc4fb23714e41246e92 /src/vnet
parentceab7882f8016c2407a4383f87277bad069885b1 (diff)
Fix clang implicit conversion errors
Change-Id: I1771a1cca2a4bc394677b2a18f14c47f0633fa77 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/ethernet/ethernet.h15
-rwxr-xr-xsrc/vnet/ethernet/node.c15
2 files changed, 16 insertions, 14 deletions
diff --git a/src/vnet/ethernet/ethernet.h b/src/vnet/ethernet/ethernet.h
index 9a97817262c..80c6ccd3c3b 100644
--- a/src/vnet/ethernet/ethernet.h
+++ b/src/vnet/ethernet/ethernet.h
@@ -71,15 +71,16 @@ static_always_inline int
ethernet_frame_is_tagged (u16 type)
{
#if __SSE4_2__
- const __m128i ethertype_mask = _mm_set_epi16 (ETHERNET_TYPE_VLAN,
- ETHERNET_TYPE_DOT1AD,
- ETHERNET_TYPE_VLAN_9100,
- ETHERNET_TYPE_VLAN_9200,
+ const __m128i ethertype_mask = _mm_set_epi16 ((u16) ETHERNET_TYPE_VLAN,
+ (u16) ETHERNET_TYPE_DOT1AD,
+ (u16) ETHERNET_TYPE_VLAN_9100,
+ (u16) ETHERNET_TYPE_VLAN_9200,
/* duplicate last one to
fill register */
- ETHERNET_TYPE_VLAN_9200,
- ETHERNET_TYPE_VLAN_9200,
- ETHERNET_TYPE_VLAN_9200,
+ (u16) ETHERNET_TYPE_VLAN_9200,
+ (u16) ETHERNET_TYPE_VLAN_9200,
+ (u16) ETHERNET_TYPE_VLAN_9200,
+ (u16)
ETHERNET_TYPE_VLAN_9200);
__m128i r = _mm_set1_epi16 (type);
diff --git a/src/vnet/ethernet/node.c b/src/vnet/ethernet/node.c
index a2e7524a5b2..3b85483732c 100755
--- a/src/vnet/ethernet/node.c
+++ b/src/vnet/ethernet/node.c
@@ -289,14 +289,15 @@ static_always_inline int
ethernet_frame_is_any_tagged (u16 type0, u16 type1)
{
#if __SSE4_2__
- const __m128i ethertype_mask = _mm_set_epi16 (ETHERNET_TYPE_VLAN,
- ETHERNET_TYPE_DOT1AD,
- ETHERNET_TYPE_VLAN_9100,
- ETHERNET_TYPE_VLAN_9200,
+ const __m128i ethertype_mask = _mm_set_epi16 ((u16) ETHERNET_TYPE_VLAN,
+ (u16) ETHERNET_TYPE_DOT1AD,
+ (u16) ETHERNET_TYPE_VLAN_9100,
+ (u16) ETHERNET_TYPE_VLAN_9200,
/* duplicate for type1 */
- ETHERNET_TYPE_VLAN,
- ETHERNET_TYPE_DOT1AD,
- ETHERNET_TYPE_VLAN_9100,
+ (u16) ETHERNET_TYPE_VLAN,
+ (u16) ETHERNET_TYPE_DOT1AD,
+ (u16) ETHERNET_TYPE_VLAN_9100,
+ (u16)
ETHERNET_TYPE_VLAN_9200);
__m128i r =