* [PATCH 1/3] Crypto/chtls: Corrected function call context
2020-01-14 12:28 [PATCH 0/3] Crypto/chtls bug fixes Vinay Kumar Yadav
@ 2020-01-14 12:28 ` Vinay Kumar Yadav
2020-01-14 12:28 ` [PATCH 2/3] crypto/chtls: Fixed listen fail when max stid range reached Vinay Kumar Yadav
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Vinay Kumar Yadav @ 2020-01-14 12:28 UTC (permalink / raw)
To: davem, herbert; +Cc: linux-crypto, netdev, Vinay Kumar Yadav
corrected function call context and moved t4_defer_reply
to apropriate location.
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
---
drivers/crypto/chelsio/chtls/chtls_cm.c | 30 ++++++++++++-------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/crypto/chelsio/chtls/chtls_cm.c b/drivers/crypto/chelsio/chtls/chtls_cm.c
index dffa2aa855fd..d4674589e1aa 100644
--- a/drivers/crypto/chelsio/chtls/chtls_cm.c
+++ b/drivers/crypto/chelsio/chtls/chtls_cm.c
@@ -1829,6 +1829,20 @@ static void send_defer_abort_rpl(struct chtls_dev *cdev, struct sk_buff *skb)
kfree_skb(skb);
}
+/*
+ * Add an skb to the deferred skb queue for processing from process context.
+ */
+static void t4_defer_reply(struct sk_buff *skb, struct chtls_dev *cdev,
+ defer_handler_t handler)
+{
+ DEFERRED_SKB_CB(skb)->handler = handler;
+ spin_lock_bh(&cdev->deferq.lock);
+ __skb_queue_tail(&cdev->deferq, skb);
+ if (skb_queue_len(&cdev->deferq) == 1)
+ schedule_work(&cdev->deferq_task);
+ spin_unlock_bh(&cdev->deferq.lock);
+}
+
static void send_abort_rpl(struct sock *sk, struct sk_buff *skb,
struct chtls_dev *cdev, int status, int queue)
{
@@ -1843,7 +1857,7 @@ static void send_abort_rpl(struct sock *sk, struct sk_buff *skb,
if (!reply_skb) {
req->status = (queue << 1);
- send_defer_abort_rpl(cdev, skb);
+ t4_defer_reply(skb, cdev, send_defer_abort_rpl);
return;
}
@@ -1862,20 +1876,6 @@ static void send_abort_rpl(struct sock *sk, struct sk_buff *skb,
cxgb4_ofld_send(cdev->lldi->ports[0], reply_skb);
}
-/*
- * Add an skb to the deferred skb queue for processing from process context.
- */
-static void t4_defer_reply(struct sk_buff *skb, struct chtls_dev *cdev,
- defer_handler_t handler)
-{
- DEFERRED_SKB_CB(skb)->handler = handler;
- spin_lock_bh(&cdev->deferq.lock);
- __skb_queue_tail(&cdev->deferq, skb);
- if (skb_queue_len(&cdev->deferq) == 1)
- schedule_work(&cdev->deferq_task);
- spin_unlock_bh(&cdev->deferq.lock);
-}
-
static void chtls_send_abort_rpl(struct sock *sk, struct sk_buff *skb,
struct chtls_dev *cdev,
int status, int queue)
--
2.24.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] crypto/chtls: Fixed listen fail when max stid range reached
2020-01-14 12:28 [PATCH 0/3] Crypto/chtls bug fixes Vinay Kumar Yadav
2020-01-14 12:28 ` [PATCH 1/3] Crypto/chtls: Corrected function call context Vinay Kumar Yadav
@ 2020-01-14 12:28 ` Vinay Kumar Yadav
2020-01-14 12:28 ` [PATCH 3/3] chelsio/cxgb4: Added tls stats prints Vinay Kumar Yadav
2020-01-22 10:12 ` [PATCH 0/3] Crypto/chtls bug fixes Herbert Xu
3 siblings, 0 replies; 5+ messages in thread
From: Vinay Kumar Yadav @ 2020-01-14 12:28 UTC (permalink / raw)
To: davem, herbert; +Cc: linux-crypto, netdev, Vinay Kumar Yadav
Do not return error when max stid reached, to Fallback to nic mode.
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
---
drivers/crypto/chelsio/chtls/chtls_main.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/chelsio/chtls/chtls_main.c b/drivers/crypto/chelsio/chtls/chtls_main.c
index a148f5c6621b..a038de90b2ea 100644
--- a/drivers/crypto/chelsio/chtls/chtls_main.c
+++ b/drivers/crypto/chelsio/chtls/chtls_main.c
@@ -84,7 +84,6 @@ static int listen_backlog_rcv(struct sock *sk, struct sk_buff *skb)
static int chtls_start_listen(struct chtls_dev *cdev, struct sock *sk)
{
struct chtls_listen *clisten;
- int err;
if (sk->sk_protocol != IPPROTO_TCP)
return -EPROTONOSUPPORT;
@@ -100,10 +99,10 @@ static int chtls_start_listen(struct chtls_dev *cdev, struct sock *sk)
clisten->cdev = cdev;
clisten->sk = sk;
mutex_lock(¬ify_mutex);
- err = raw_notifier_call_chain(&listen_notify_list,
+ raw_notifier_call_chain(&listen_notify_list,
CHTLS_LISTEN_START, clisten);
mutex_unlock(¬ify_mutex);
- return err;
+ return 0;
}
static void chtls_stop_listen(struct chtls_dev *cdev, struct sock *sk)
--
2.24.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] chelsio/cxgb4: Added tls stats prints
2020-01-14 12:28 [PATCH 0/3] Crypto/chtls bug fixes Vinay Kumar Yadav
2020-01-14 12:28 ` [PATCH 1/3] Crypto/chtls: Corrected function call context Vinay Kumar Yadav
2020-01-14 12:28 ` [PATCH 2/3] crypto/chtls: Fixed listen fail when max stid range reached Vinay Kumar Yadav
@ 2020-01-14 12:28 ` Vinay Kumar Yadav
2020-01-22 10:12 ` [PATCH 0/3] Crypto/chtls bug fixes Herbert Xu
3 siblings, 0 replies; 5+ messages in thread
From: Vinay Kumar Yadav @ 2020-01-14 12:28 UTC (permalink / raw)
To: davem, herbert; +Cc: linux-crypto, netdev, Vinay Kumar Yadav
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
index 93868dca186a..c41b72c879c1 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
@@ -3399,6 +3399,13 @@ static int chcr_stats_show(struct seq_file *seq, void *v)
atomic_read(&adap->chcr_stats.fallback));
seq_printf(seq, "IPSec PDU: %10u\n",
atomic_read(&adap->chcr_stats.ipsec_cnt));
+ seq_printf(seq, "TLS PDU Tx: %10u\n",
+ atomic_read(&adap->chcr_stats.tls_pdu_tx));
+ seq_printf(seq, "TLS PDU Rx: %10u\n",
+ atomic_read(&adap->chcr_stats.tls_pdu_rx));
+ seq_printf(seq, "TLS Keys (DDR) Count: %10u\n",
+ atomic_read(&adap->chcr_stats.tls_key));
+
return 0;
}
DEFINE_SHOW_ATTRIBUTE(chcr_stats);
--
2.24.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] Crypto/chtls bug fixes
2020-01-14 12:28 [PATCH 0/3] Crypto/chtls bug fixes Vinay Kumar Yadav
` (2 preceding siblings ...)
2020-01-14 12:28 ` [PATCH 3/3] chelsio/cxgb4: Added tls stats prints Vinay Kumar Yadav
@ 2020-01-22 10:12 ` Herbert Xu
3 siblings, 0 replies; 5+ messages in thread
From: Herbert Xu @ 2020-01-22 10:12 UTC (permalink / raw)
To: Vinay Kumar Yadav; +Cc: davem, linux-crypto, netdev
On Tue, Jan 14, 2020 at 05:58:46PM +0530, Vinay Kumar Yadav wrote:
> These patches fix followings
> patch 1: Corrected function call context
> patch 2: TCP listen fail bug fix
> patch 3: Added stats counter for tls
>
> Vinay Kumar Yadav (3):
> Crypto/chtls: Corrected function call context
> crypto/chtls: Fixed listen fail when max stid range reached
> chelsio/cxgb4: Added tls stats prints
>
> drivers/crypto/chelsio/chtls/chtls_cm.c | 30 +++++++++----------
> drivers/crypto/chelsio/chtls/chtls_main.c | 5 ++--
> .../ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 7 +++++
> 3 files changed, 24 insertions(+), 18 deletions(-)
Patches 1-2 applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 5+ messages in thread