linux_dsm_epyc7002/drivers/infiniband/ulp/opa_vnic
Alexander Duyck d80d8d5573 opa_vnic: Just use skb_get_hash instead of skb_tx_hash
This patch is meant to clean up how the opa_vnic is obtaining entropy from
Tx packets.

The code as it was written was claiming to get 16 bits of hash, but from
what I can tell it was only ever actually getting 14 bits as it was limited
to 0 - (2^15 - 1). It then was folding the result to get a 8 bit value for
entropy.

Instead of throwing away all that input I am cutting out the middle man and
instead having the code call skb_get_hash directly and then folding the 32
bit value into a 8 bit value using a pair of shifts and XOR operations.

Execution wise this new approach should provide more entropy and be faster
since we are bypassing the reciprocal multiplication to reduce the 32b
value to 16b and instead just using a shift/XOR combination.

In addition we can drop the unneeded adapter value from the call to get the
entropy since the netdev itself isn't even needed.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-29 22:01:32 -04:00
..
Kconfig IB/opa-vnic: Virtual Network Interface Controller (VNIC) netdev 2017-04-20 12:01:38 -04:00
Makefile IB/opa-vnic: VNIC Ethernet Management Agent (VEMA) function 2017-04-20 12:01:38 -04:00
opa_vnic_encap.c opa_vnic: Just use skb_get_hash instead of skb_tx_hash 2018-04-29 22:01:32 -04:00
opa_vnic_encap.h IB/opa_vnic: Add routing control information 2017-09-27 11:21:57 -04:00
opa_vnic_ethtool.c IB/opa_vnic: Use spinlock instead of mutex for stats_lock 2017-06-29 12:43:52 -04:00
opa_vnic_internal.h opa_vnic: Just use skb_get_hash instead of skb_tx_hash 2018-04-29 22:01:32 -04:00
opa_vnic_netdev.c opa_vnic: Just use skb_get_hash instead of skb_tx_hash 2018-04-29 22:01:32 -04:00
opa_vnic_vema_iface.c IB/opa_vnic: Add routing control information 2017-09-27 11:21:57 -04:00
opa_vnic_vema.c infiniband: fix ulp/opa_vnic/opa_vnic_vema.c kernel-doc notation 2018-01-10 22:00:34 -07:00