summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
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 =