bpf: sk_msg, sock{map|hash} redirect through ULP
[linux-2.6-block.git] / include / net / tls.h
index bab5627ff5e393502fc5ed4eb7bd33cae5d02d14..23601f3b02ee23673c584063ca5122c3b7c54f81 100644 (file)
@@ -454,6 +454,15 @@ tls_offload_ctx_tx(const struct tls_context *tls_ctx)
        return (struct tls_offload_context_tx *)tls_ctx->priv_ctx_tx;
 }
 
+static inline bool tls_sw_has_ctx_tx(const struct sock *sk)
+{
+       struct tls_context *ctx = tls_get_ctx(sk);
+
+       if (!ctx)
+               return false;
+       return !!tls_sw_ctx_tx(ctx);
+}
+
 static inline struct tls_offload_context_rx *
 tls_offload_ctx_rx(const struct tls_context *tls_ctx)
 {