From: Ding Tianhong <dingtianhong@xxxxxxxxxx> Date: Tue, 4 Mar 2014 18:47:30 +0800 > Ether_addr_equal_64bits is more efficient than ether_addr_equal, and > can be used when each argument is an array within a structure that > contains at least two bytes of data beyond the array, so it is safe > to use it for vlan. > > On a simple test by iperf, it reduces the CPU %system time from 14% to 12%. > > According Joe's suggestion, maybe it'd be faster to add an unlikely to > the test for PCKET_OTHERHOST, so I add it and see whether the performance > could be better, but the differences is so small and negligible, maybe my > test case is not effective enough, but I still add the unlikely and wait to > hear more opinions.:) > > Cc: Joe Perches <joe@xxxxxxxxxxx> > Cc: Patrick McHardy <kaber@xxxxxxxxx> > Cc: David S. Miller <davem@xxxxxxxxxxxxx> > Signed-off-by: Ding Tianhong <dingtianhong@xxxxxxxxxx> I agree with Joe that we should only use the optimized routine in performance critical paths. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html