net/vmxnet3: support receive data ring
authorShrikrishna Khare <skhare@vmware.com>
Mon, 6 Mar 2017 22:55:04 +0000 (14:55 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 4 Apr 2017 13:52:51 +0000 (15:52 +0200)
commitc4be1a65341e6006fd14980f7348606925597966
treee95bbdd63d45081f71268e000eea5fff46880beb
parent01fef6e3c181733529f62a8ac7bffe06994a5536
net/vmxnet3: support receive data ring

vmxnet3 driver preallocates buffers for receiving packets and posts the
buffers to the emulation. In order to deliver a received packet to the
guest, the emulation must map buffer(s) and copy the packet into it.

To avoid this memory mapping overhead, this patch introduces the receive
data ring - a set of small sized buffers that are always mapped by
the emulation. If a packet fits into the receive data ring buffer, the
emulation delivers the packet via the receive data ring (which must be
copied by the guest driver), or else the usual receive path is used.

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Jin Heo <heoj@vmware.com>
drivers/net/vmxnet3/base/vmxnet3_defs.h
drivers/net/vmxnet3/vmxnet3_ethdev.c
drivers/net/vmxnet3/vmxnet3_ethdev.h
drivers/net/vmxnet3/vmxnet3_ring.h
drivers/net/vmxnet3/vmxnet3_rxtx.c