net: optimize ethernet address functions
authorMorten Brørup <mb@smartsharesystems.com>
Fri, 26 Jun 2020 16:51:35 +0000 (18:51 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:06 +0000 (18:55 +0200)
commita6f67a3b64f558b4a376e683ad9d8d7e7e7bbbf9
tree114173dc5368e022e0f00f1dc8f7e1f29abc605b
parent2e8fb3d2442cc0123562d4c43a6e86a1bb3df62f
net: optimize ethernet address functions

* rte_is_broadcast_ether_addr():
Use binary logic instead of comparisons and boolean logic, thus reducing
the number of branches.
It now resembles rte_is_zero_ether_addr().

* rte_ether_addr_copy():
The source code modifications were discussed on the mailing list:
http://mails.dpdk.org/archives/dev/2020-June/171584.html
Remove obsolete ICC-specific code and related comment.
Restrict pointer aliasing (suggested by Jerin Jacob).
Remove superfluous "Fast" from function description headline; all DPDK
data plane functions are supposed to be fast.

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_net/rte_ether.h