net/enic: fix possible Rx corruption
authorJohn Daley <johndale@cisco.com>
Tue, 19 Jul 2016 22:42:43 +0000 (15:42 -0700)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 21 Jul 2016 22:46:16 +0000 (00:46 +0200)
commit1ccc51b079c4e36d5701dc1500b2aafa1235858e
tree08e7dc1538795f7b04a0c6237d57fee2aa59450b
parent62e82667fd2775c4413c0a575226d84815e2d9b7
net/enic: fix possible Rx corruption

Initialize the mbuf data offset to RTE_PKTMBUF_HEADROOM as the
enic takes ownership of them. If allocated mbufs had some offset
other than RTE_PKTMBUF_HEADROOM, the application would read mbuf
data starting at the wrong place and misinterpret the packet.

Fixes: 856d7ba7ed22 ("net/enic: support scattered Rx")

Reviewed-by: Nelson Escobar <neescoba@cisco.com>
Signed-off-by: John Daley <johndale@cisco.com>
drivers/net/enic/enic_main.c
drivers/net/enic/enic_rxtx.c