aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h
diff options
context:
space:
mode:
authorRohit Maheshwari <rohitm@chelsio.com>2020-11-09 16:21:31 +0530
committerJakub Kicinski <kuba@kernel.org>2020-11-11 16:30:37 -0800
commit9d2e5e9eeb59524a59b461fe256139826d464e1e (patch)
treee6f7a5224b9993c13c3aaa50a6e84b7d63c6a85c /drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h
parentnet/x25: Fix null-ptr-deref in x25_connect (diff)
downloadwireguard-linux-9d2e5e9eeb59524a59b461fe256139826d464e1e.tar.xz
wireguard-linux-9d2e5e9eeb59524a59b461fe256139826d464e1e.zip
cxgb4/ch_ktls: decrypted bit is not enough
If skb has retransmit data starting before start marker, e.g. ccs, decrypted bit won't be set for that, and if it has some data to encrypt, then it must be given to crypto ULD. So in place of decrypted, check if socket is tls offloaded. Also, unless skb has some data to encrypt, no need to give it for tls offload handling. v2->v3: - Removed ifdef. Fixes: 5a4b9fe7fece ("cxgb4/chcr: complete record tx handling") Signed-off-by: Rohit Maheshwari <rohitm@chelsio.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h
index b169776ab484..e2a4941fa802 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h
@@ -493,6 +493,11 @@ struct cxgb4_uld_info {
#endif
};
+static inline bool cxgb4_is_ktls_skb(struct sk_buff *skb)
+{
+ return skb->sk && tls_is_sk_tx_device_offloaded(skb->sk);
+}
+
void cxgb4_uld_enable(struct adapter *adap);
void cxgb4_register_uld(enum cxgb4_uld type, const struct cxgb4_uld_info *p);
int cxgb4_unregister_uld(enum cxgb4_uld type);