summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip_packet.h
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2021-11-10 08:54:38 -0800
committerSteven Luong <sluong@cisco.com>2021-11-10 09:02:24 -0800
commit4d769c71a10bb99a1afc369e85d7d444e7b439f3 (patch)
treefdabf78779e14c2704cc69bc4d191aba04990739 /src/vnet/ip/ip_packet.h
parent56f54af21d18f9fdd471b81db77a3942b0aa4d9c (diff)
ip: crash in ip_csum_fold due to illegal instruction shrx
Encounter a crash for the line shrx edi,eax,edi in ip_csum_fold. The target cpu is ivy bridge which does not support shrx instruction. Type: fix Fixes: e6709ff37dc0f3a58ed5ad98aace73fe801f1e9d Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Icc922d3b2ebfcfa721f63946a213b6c492874a9a
Diffstat (limited to 'src/vnet/ip/ip_packet.h')
-rwxr-xr-x[-rw-r--r--]src/vnet/ip/ip_packet.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/ip/ip_packet.h b/src/vnet/ip/ip_packet.h
index d862caa3a52..837b3df8563 100644..100755
--- a/src/vnet/ip/ip_packet.h
+++ b/src/vnet/ip/ip_packet.h
@@ -301,7 +301,7 @@ always_inline u16
ip_csum_fold (ip_csum_t c)
{
/* Reduce to 16 bits. */
-#ifdef __x86_64__
+#if defined(__x86_64__) && defined(__BMI2__)
u64 tmp;
asm volatile(
/* using ADC is much faster than mov, shift, add sequence