net/tls: simplify driver context retrieval
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 5 Jun 2019 21:11:39 +0000 (14:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Jun 2019 21:13:40 +0000 (14:13 -0700)
commit2e361176ea01c4b2f90b17c2264a2a794050c3f3
tree407a31cf337a174075de097c6c4a179b6517991f
parent2d6b51c6924c1bba8e4948dc4a2dbc96bf685b97
net/tls: simplify driver context retrieval

Currently drivers have to ensure the alignment of their tls state
structure, which leads to unnecessary layers of getters and
encapsulated structures in each driver.

Simplify all this by marking the driver state as aligned (driver_state
members are currently aligned, so no hole is added, besides ALIGN in
TLS_OFFLOAD_CONTEXT_SIZE_RX/TX would reserve this extra space, anyway.)
With that we can add a common accessor to the core.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tls.h