linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Cc: netdev@vger.kernel.org, linux-crypto@vger.kernel.org,
	davem@davemloft.net, herbert@gondor.apana.org.au,
	nirranjan@chelsio.com, atul.gupta@chelsio.com,
	vishal@chelsio.com, dt@chelsio.com
Subject: Re: [PATCH net-next v2 1/3] cxgb4/chcr: update SGL DMA unmap for USO
Date: Fri, 22 Nov 2019 16:06:29 -0800	[thread overview]
Message-ID: <20191122160629.3800b5cc@cakuba.netronome.com> (raw)
In-Reply-To: <6cf3a3928ff2ee84cca34bfcb61d3f7fcb4c4cac.1574383652.git.rahul.lakkireddy@chelsio.com>

On Fri, 22 Nov 2019 06:30:01 +0530, Rahul Lakkireddy wrote:
> The FW_ETH_TX_EO_WR used for sending UDP Segmentation Offload (USO)
> requests expects the headers to be part of the descriptor and the
> payload to be part of the SGL containing the DMA mapped addresses.
> Hence, the DMA address in the first entry of the SGL can start after
> the packet headers. Currently, unmap_sgl() tries to unmap from this
> wrong offset, instead of the originally mapped DMA address.
> 
> So, use existing unmap_skb() instead, which takes originally saved DMA
> addresses as input. Update all necessary Tx paths to save the original
> DMA addresses, so that unmap_skb() can unmap them properly.
> 
> v2:
> - No change.
> 
> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>

> diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
> index 3121ed83d8e2..61a2cf62f694 100644
> --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
> +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
> @@ -735,7 +735,12 @@ struct tx_desc {
>  	__be64 flit[8];
>  };
>  
> -struct tx_sw_desc;
> +struct ulptx_sgl;

From this patch alone the forward declaration of struct ulptx_sgl;
appears unnecessary or a left over from some previous version of the
code?

> +struct tx_sw_desc {
> +	struct sk_buff *skb; /* SKB to free after getting completion */
> +	dma_addr_t addr[MAX_SKB_FRAGS + 1]; /* DMA mapped addresses */
> +};
>  
>  struct sge_txq {
>  	unsigned int  in_use;       /* # of in-use Tx descriptors */

  reply	other threads:[~2019-11-23  0:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22  1:00 [PATCH net-next v2 0/3] cxgb4: add UDP Segmentation Offload support Rahul Lakkireddy
2019-11-22  1:00 ` [PATCH net-next v2 1/3] cxgb4/chcr: update SGL DMA unmap for USO Rahul Lakkireddy
2019-11-23  0:06   ` Jakub Kicinski [this message]
2019-11-23  0:19     ` Jakub Kicinski
2019-11-22  1:00 ` [PATCH net-next v2 2/3] cxgb4: add UDP segmentation offload support Rahul Lakkireddy
2019-11-23  0:13   ` Jakub Kicinski
2019-11-23 19:57     ` Rahul Lakkireddy
2019-11-22  1:00 ` [PATCH net-next v2 3/3] cxgb4: add stats for MQPRIO QoS offload Tx path Rahul Lakkireddy
2019-11-23  0:48 ` [PATCH net-next v2 0/3] cxgb4: add UDP Segmentation Offload support Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191122160629.3800b5cc@cakuba.netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=atul.gupta@chelsio.com \
    --cc=davem@davemloft.net \
    --cc=dt@chelsio.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nirranjan@chelsio.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=vishal@chelsio.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).