/****************************************************************************** * tpmif.h * * TPM I/O interface for Xen guest OSes, v2 * * This file is in the public domain. * */ #ifndef __XEN_PUBLIC_IO_TPMIF_H__ #define __XEN_PUBLIC_IO_TPMIF_H__ /* * Xenbus state machine * * Device open: * 1. Both ends start in XenbusStateInitialising * 2. Backend transitions to InitWait (frontend does not wait on this step) * 3. Frontend populates ring-ref, event-channel, feature-protocol-v2 * 4. Frontend transitions to Initialised * 5. Backend maps grant and event channel, verifies feature-protocol-v2 * 6. Backend transitions to Connected * 7. Frontend verifies feature-protocol-v2, transitions to Connected * * Device close: * 1. State is changed to XenbusStateClosing * 2. Frontend transitions to Closed * 3. Backend unmaps grant and event, changes state to InitWait */ enum vtpm_shared_page_state { VTPM_STATE_IDLE, /* no contents / vTPM idle / cancel complete */ VTPM_STATE_SUBMIT, /* request ready / vTPM working */ VTPM_STATE_FINISH, /* response ready / vTPM idle */ VTPM_STATE_CANCEL, /* cancel requested / vTPM working */ }; /* The backend should only change state to IDLE or FINISH, while the * frontend should only change to SUBMIT or CANCEL. */ struct vtpm_shared_page { uint32_t length; /* request/response length in bytes */ uint8_t state; /* enum vtpm_shared_page_state */ uint8_t locality; /* for the current request */ uint8_t pad; uint8_t nr_extra_pages; /* extra pages for long packets; may be zero */ uint32_t extra_pages[0]; /* grant IDs; length in nr_extra_pages */ }; #endif inux/net-next.git/tree/?id=03e2a30f6a27e2f3e5283b777f6ddd146b38c738'>treecommitdiff
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2017-01-17 10:23:03 +0100
committerSteffen Klassert <steffen.klassert@secunet.com>2017-01-17 10:23:03 +0100
commit03e2a30f6a27e2f3e5283b777f6ddd146b38c738 (patch)
tree7edbea6c3150bc379018743705c30f25972d209c
parentcac2661c53f35cbe651bef9b07026a5a05ab8ce0 (diff)
esp6: Avoid skb_cow_data whenever possible
This patch tries to avoid skb_cow_data on esp6. 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