net/vmxnet3: introduce generalized cmd interface
authorShrikrishna Khare <skhare@vmware.com>
Mon, 6 Mar 2017 22:55:02 +0000 (14:55 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 4 Apr 2017 13:52:51 +0000 (15:52 +0200)
commit2d1c4b176ecf386754cceea28bd2a89b991eac72
tree6afed9cdd3eb6d14555f6ac266b9d5d904930318
parent36b84ba041feb410a3e6642067b205a878aae8de
net/vmxnet3: introduce generalized cmd interface

Shared memory is used to exchange information between the vmxnet3 driver
and the emulation. In order to request emulation to perform a task, the
driver first populates specific fields in this shared memory and then
issues corresponding command by writing to the command register(CMD). The
layout of the shared memory was defined by vmxnet3 version 1 and cannot
be extended for every new command without breaking backward compatibility.

To address this problem, in vmxnet3 version 3, the emulation repurposed
a reserved field in the shared memory to represent command information
instead. For new commands, the driver first populates the command
information field in the shared memory and then issues the command. The
emulation interprets the data written to the command information
depending on the type of the command. This patch exposes this capability
to the driver.

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