]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit943b446748fb7fed4b6f4064edffbdf4e04c3fac
tree407a31cf337a174075de097c6c4a179b6517991f
parentfc8204cdb2487e49afeadc7970380cd8862616f8
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