lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191122160629.3800b5cc@cakuba.netronome.com>
Date:   Fri, 22 Nov 2019 16:06:29 -0800
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Rahul Lakkireddy <rahul.lakkireddy@...lsio.com>
Cc:     netdev@...r.kernel.org, linux-crypto@...r.kernel.org,
        davem@...emloft.net, herbert@...dor.apana.org.au,
        nirranjan@...lsio.com, atul.gupta@...lsio.com, vishal@...lsio.com,
        dt@...lsio.com
Subject: Re: [PATCH net-next v2 1/3] cxgb4/chcr: update SGL DMA unmap for
 USO

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@...lsio.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 */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ