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