summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthew Smith <mgsmith@netgate.com>2019-09-03 16:45:33 -0500
committerDamjan Marion <dmarion@me.com>2019-09-04 09:56:52 +0000
commit3ce1239b8ece822d2d8f9bcbc516f778bdf52cdf (patch)
tree3a381fe7852b1f48338c6bf3ccde2443bb9fb250 /src
parent5bdc1f5245054f8b183b75f6b4442d45018afbe3 (diff)
ethernet: fix dmac check avx2 loop condition
In eth_input_process_frame(), a loop which checks the destination MAC address of received packets had a different condition for avx2 than it did for the non-avx2 version of the loop. It could result in one unnecessary execution of the loop body after all packets had been processed. Type: fix Fixes: 8d6f34e2b1cbfde5702e88686631527d5e1e10a0 Change-Id: Ib673f45917a0dea461987fdc8f0ca318b749fb1a Signed-off-by: Matthew Smith <mgsmith@netgate.com> (cherry picked from commit a6d4e3135b70db1b1df3f8852e1e229d13c24e72)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/vnet/ethernet/node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/ethernet/node.c b/src/vnet/ethernet/node.c
index 4640540ac2b..1f408de1bb5 100755
--- a/src/vnet/ethernet/node.c
+++ b/src/vnet/ethernet/node.c
@@ -717,7 +717,7 @@ eth_input_process_frame (vlib_main_t * vm, vlib_node_runtime_t * node,
u64x4 igbit4 = u64x4_splat (igbit);
u64x4 mask4 = u64x4_splat (mask);
u64x4 hwaddr4 = u64x4_splat (hwaddr);
- while (n_left >= 0)
+ while (n_left > 0)
{
u64x4 r0, r1;
r0 = u64x4_load_unaligned (dmac + 0) & mask4;