Skip to content

Commit

Permalink
crypto: chcr - small packet Tx stalls the queue
Browse files Browse the repository at this point in the history
Immediate packets sent to hardware should include the work
request length in calculating the flits. WR occupy one flit and
if not accounted result in invalid request which stalls the HW
queue.

Cc: stable@vger.kernel.org
Signed-off-by: Atul Gupta <atul.gupta@chelsio.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Atul Gupta authored and Herbert Xu committed Dec 7, 2018
1 parent 1f6669b commit c35828e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/crypto/chelsio/chcr_ipsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,10 @@ static bool chcr_ipsec_offload_ok(struct sk_buff *skb, struct xfrm_state *x)

static inline int is_eth_imm(const struct sk_buff *skb, unsigned int kctx_len)
{
int hdrlen = sizeof(struct chcr_ipsec_req) + kctx_len;
int hdrlen;

hdrlen = sizeof(struct fw_ulptx_wr) +
sizeof(struct chcr_ipsec_req) + kctx_len;

hdrlen += sizeof(struct cpl_tx_pkt);
if (skb->len <= MAX_IMM_TX_PKT_LEN - hdrlen)
Expand Down

0 comments on commit c35828e

Please sign in to comment.