[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201019115025.24233-6-vinay.yadav@chelsio.com>
Date: Mon, 19 Oct 2020 17:20:24 +0530
From: Vinay Kumar Yadav <vinay.yadav@...lsio.com>
To: netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org
Cc: secdev@...lsio.com, Vinay Kumar Yadav <vinay.yadav@...lsio.com>
Subject: [PATCH net 5/6] chelsio/chtls: correct function return and return type
csk_mem_free() should return true if send buffer is available,
false otherwise.
Fixes: 3b8305f5c844 ("crypto: chtls - wait for memory sendmsg, sendpage")
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@...lsio.com>
---
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
index 28c6c538032d..9fb5ca6682ea 100644
--- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
+++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
@@ -902,9 +902,9 @@ static int chtls_skb_copy_to_page_nocache(struct sock *sk,
return 0;
}
-static int csk_mem_free(struct chtls_dev *cdev, struct sock *sk)
+static bool csk_mem_free(struct chtls_dev *cdev, struct sock *sk)
{
- return (cdev->max_host_sndbuf - sk->sk_wmem_queued);
+ return (cdev->max_host_sndbuf - sk->sk_wmem_queued > 0);
}
static int csk_wait_memory(struct chtls_dev *cdev,
--
2.18.1
Powered by blists - more mailing lists