enic: fix offset for Rx mbuf data
authorJohn Daley <johndale@cisco.com>
Wed, 27 Apr 2016 02:51:56 +0000 (19:51 -0700)
committerBruce Richardson <bruce.richardson@intel.com>
Fri, 6 May 2016 13:51:22 +0000 (15:51 +0200)
commit4a3259d620f8d6eeaec2f4614556a6b00a8f4754
tree2ca404e078e5fd2073340853599e85a7aa643d7b
parent6e138189cefc1e29d6da65e1b50e0920882ec41f
enic: fix offset for Rx mbuf data

The code to provide mbufs for RX used m->data_off instead of
RTE_PKTMBUF_HEADROOM as the position inside the mbuf for the data to be
written. As the mbuf is uninitialised, this could potentially cause Rx
data to be placed at the wrong address in the mbuf - or even outside it.

Fixes: 947d860c821f ("enic: improve Rx performance")

Signed-off-by: John Daley <johndale@cisco.com>
drivers/net/enic/enic_main.c
drivers/net/enic/enic_rx.c