]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen-netback: introduce staging grant mappings ops
authorJoao Martins <joao.m.martins@oracle.com>
Fri, 12 May 2017 08:46:38 +0000 (09:46 +0100)
committerJoao Martins <joao.m.martins@oracle.com>
Wed, 31 May 2017 21:51:57 +0000 (22:51 +0100)
commit33e354017b7a0a1bb943d4e58ca4634f9fbe2ab2
tree570cd461fc881c6fe975555d44e1b64acb598153
parentd9f6883bd3a8e5ad543d49563f57efa7b159365c
xen-netback: introduce staging grant mappings ops

Introduce support for staging grants which means having a
set of preallocated buffers that get reused over time. This is
negotiated through a couple of xenstore entries in the form of:

 * /local/domain/1/device/vif/0/queue-0 = ""
 * /local/domain/1/device/vif/0/queue-0/tx-pool-ref  = "<ring-ref-tx0>"
 * /local/domain/1/device/vif/0/queue-0/tx-pool-size = "<nr-entries-tx0>"
 * /local/domain/1/device/vif/0/queue-0/rx-pool-ref  = "<ring-ref-rx0>"
 * /local/domain/1/device/vif/0/queue-0/rx-pool-size = "<nr-entries-rx0>"

These entries will hand over a list of `struct xen_ext_gref_alloc` which
frontend provide (size of XEN_PAGE_SIZE which fits 512 entries). And
these entries contain the gref and flags to map into a Domain-0
ballooned page, which gets added in a hash table of gref <-> backing
page kept per queue. Frontend can use this to pregrant certain pages and
reuse them for Rx/Tx requests.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Orabug: 26107942
drivers/net/xen-netback/Makefile
drivers/net/xen-netback/common.h
drivers/net/xen-netback/grant.c [new file with mode: 0644]
drivers/net/xen-netback/interface.c
drivers/net/xen-netback/netback.c
drivers/net/xen-netback/xenbus.c