diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-06-11 06:40:08 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-11 21:22:27 +0200 |
commit | eeb2efaf36c75753f9028de3500669bddfac81a8 (patch) | |
tree | 14a877922a5439e575346eb436ffcacb63d61b5c /net/tls | |
parent | nfp: tls: enable TLS RX offload (diff) | |
download | linux-eeb2efaf36c75753f9028de3500669bddfac81a8.tar.xz linux-eeb2efaf36c75753f9028de3500669bddfac81a8.zip |
net/tls: generalize the resync callback
Currently only RX direction is ever resynced, however, TX may
also get out of sequence if packets get dropped on the way to
the driver. Rename the resync callback and add a direction
parameter.
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>
Diffstat (limited to 'net/tls')
-rw-r--r-- | net/tls/tls_device.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c index 477c869c69c8..b35a3b902bfa 100644 --- a/net/tls/tls_device.c +++ b/net/tls/tls_device.c @@ -559,7 +559,8 @@ static void tls_device_resync_rx(struct tls_context *tls_ctx, return; netdev = READ_ONCE(tls_ctx->netdev); if (netdev) - netdev->tlsdev_ops->tls_dev_resync_rx(netdev, sk, seq, rcd_sn); + netdev->tlsdev_ops->tls_dev_resync(netdev, sk, seq, rcd_sn, + TLS_OFFLOAD_CTX_DIR_RX); clear_bit_unlock(TLS_RX_SYNC_RUNNING, &tls_ctx->flags); } @@ -1105,7 +1106,7 @@ static int tls_dev_event(struct notifier_block *this, unsigned long event, case NETDEV_REGISTER: case NETDEV_FEAT_CHANGE: if ((dev->features & NETIF_F_HW_TLS_RX) && - !dev->tlsdev_ops->tls_dev_resync_rx) + !dev->tlsdev_ops->tls_dev_resync) return NOTIFY_BAD; if (dev->tlsdev_ops && |