diff mbox

Crypto:Chelsio: no csum offload for ipsec path

Message ID 1519840088-12607-1-git-send-email-atul.gupta@chelsio.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show

Commit Message

Atul Gupta Feb. 28, 2018, 5:48 p.m. UTC
The Inline IPSec driver does not offload csum.

Signed-off-by: Atul Gupta <atul.gupta@chelsio.com>
---
 drivers/crypto/chelsio/chcr_ipsec.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Herbert Xu March 9, 2018, 3:19 p.m. UTC | #1
On Wed, Feb 28, 2018 at 11:18:08PM +0530, Atul Gupta wrote:
> The Inline IPSec driver does not offload csum.
> 
> Signed-off-by: Atul Gupta <atul.gupta@chelsio.com>

Patch applied.  Thanks.
diff mbox

Patch

diff --git a/drivers/crypto/chelsio/chcr_ipsec.c b/drivers/crypto/chelsio/chcr_ipsec.c
index db1e241..8e0aa3f 100644
--- a/drivers/crypto/chelsio/chcr_ipsec.c
+++ b/drivers/crypto/chelsio/chcr_ipsec.c
@@ -360,8 +360,7 @@  inline void *copy_cpltx_pktxt(struct sk_buff *skb,
 
 	cpl = (struct cpl_tx_pkt_core *)pos;
 
-	if (skb->ip_summed == CHECKSUM_PARTIAL)
-		cntrl = TXPKT_L4CSUM_DIS_F | TXPKT_IPCSUM_DIS_F;
+	cntrl = TXPKT_L4CSUM_DIS_F | TXPKT_IPCSUM_DIS_F;
 	ctrl0 = TXPKT_OPCODE_V(CPL_TX_PKT_XT) | TXPKT_INTF_V(pi->tx_chan) |
 			       TXPKT_PF_V(adap->pf);
 	if (skb_vlan_tag_present(skb)) {
@@ -475,7 +474,7 @@  inline void *chcr_crypto_wreq(struct sk_buff *skb,
 	wr->req.ulptx.len = htonl(DIV_ROUND_UP(flits, 2)  - 1);
 
 	/* Sub-command */
-	wr->req.sc_imm.cmd_more = FILL_CMD_MORE(immdatalen);
+	wr->req.sc_imm.cmd_more = FILL_CMD_MORE(!immdatalen);
 	wr->req.sc_imm.len = cpu_to_be32(sizeof(struct cpl_tx_sec_pdu) +
 					 sizeof(wr->req.key_ctx) +
 					 kctx_len +