/* Simple wrappers around HVM functions */ #ifndef XEN_HVM_H__ #define XEN_HVM_H__ #include #include static const char *param_name(int op) { #define PARAM(x) [HVM_PARAM_##x] = #x static const char *const names[] = { PARAM(CALLBACK_IRQ), PARAM(STORE_PFN), PARAM(STORE_EVTCHN), PARAM(PAE_ENABLED), PARAM(IOREQ_PFN), PARAM(BUFIOREQ_PFN), PARAM(TIMER_MODE), PARAM(HPET_ENABLED), PARAM(IDENT_PT), PARAM(DM_DOMAIN), PARAM(ACPI_S_STATE), PARAM(VM86_TSS), PARAM(VPT_ALIGN), PARAM(CONSOLE_PFN), PARAM(CONSOLE_EVTCHN), }; #undef PARAM if (op >= ARRAY_SIZE(names)) return "unknown"; if (!names[op]) return "reserved"; return names[op]; } static inline int hvm_get_parameter(int idx, uint64_t *value) { struct xen_hvm_param xhv; int r; xhv.domid = DOMID_SELF; xhv.index = idx; r = HYPERVISOR_hvm_op(HVMOP_get_param, &xhv); if (r < 0) { pr_err("Cannot get hvm parameter %s (%d): %d!\n", param_name(idx), idx, r); return r; } *value = xhv.value; return r; } #define HVM_CALLBACK_VIA_TYPE_VECTOR 0x2 #define HVM_CALLBACK_VIA_TYPE_SHIFT 56 #define HVM_CALLBACK_VECTOR(x) (((uint64_t)HVM_CALLBACK_VIA_TYPE_VECTOR)<<\ HVM_CALLBACK_VIA_TYPE_SHIFT | (x)) #endif /* XEN_HVM_H__ */ lue='packet-rx-pump-back'>packet-rx-pump-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2017-01-17 10:22:57 +0100
committerSteffen Klassert <steffen.klassert@secunet.com>2017-01-17 10:22:57 +0100
commitcac2661c53f35cbe651bef9b07026a5a05ab8ce0 (patch)
tree5dcfc6cc74b9d68bd7282dade08fb1c9d0a7989e /include
parent726282aa6bbe627b3876afc27f88172e37b1d01d (diff)
esp4: Avoid skb_cow_data whenever possible
This patch tries to avoid skb_cow_data on esp4. On the encrypt side we add the IPsec tailbits to the linear part of the buffer if there is space on it. If there is no space on the linear part, we add a page fragment with the tailbits to the buffer and use separate src and dst scatterlists. On the decrypt side, we leave the buffer as it is if it is not cloned. With this, we can avoid a linearization of the buffer in most of the cases. Joint work with: Sowmini Varadhan <sowmini.varadhan@oracle.com> Ilan Tayari <ilant@mellanox.com> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Signed-off-by: Ilan Tayari <ilant@mellanox.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'include')