mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: madalin.bucur@nxp.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 1/4] dpaa_eth: fix SG mapping
Date: Tue, 20 Feb 2018 13:56:16 -0500 (EST)	[thread overview]
Message-ID: <20180220.135616.822494587891051955.davem@davemloft.net> (raw)
In-Reply-To: <20180219161044.30279-2-madalin.bucur@nxp.com>

From: Madalin Bucur <madalin.bucur@nxp.com>
Date: Mon, 19 Feb 2018 10:10:41 -0600

> An issue in the code mapping the skb fragments into
> scatter-gather frames was evidentiated by netperf
> TCP_SENDFILE tests. This patch addresses the issue.
> 
> Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>

This is a poorly worded commit message.

You have to say exactly what "the issue" is.

Reading your patch:

> @@ -1916,8 +1916,10 @@ static int skb_to_sg_fd(struct dpaa_priv *priv,
>  		goto csum_failed;
>  	}
>  
> +	/* SGT[0] is used by the linear part */
>  	sgt = (struct qm_sg_entry *)(sgt_buf + priv->tx_headroom);
> -	qm_sg_entry_set_len(&sgt[0], skb_headlen(skb));
> +	buff_len = skb_headlen(skb);
> +	qm_sg_entry_set_len(&sgt[0], buff_len);
>  	sgt[0].bpid = FSL_DPAA_BPID_INV;
>  	sgt[0].offset = 0;
>  	addr = dma_map_single(dev, skb->data,

This change has no effect and is unrelated.  Please do not mix
unrelated changes with the main change, because this makes it
hard to review your work.

> @@ -1930,27 +1932,28 @@ static int skb_to_sg_fd(struct dpaa_priv *priv,
>  	qm_sg_entry_set64(&sgt[0], addr);
>  
>  	/* populate the rest of SGT entries */
> -	frag = &skb_shinfo(skb)->frags[0];
> -	frag_len = frag->size;
> -	for (i = 1; i <= nr_frags; i++, frag++) {
> +	for (i = 0; i < nr_frags; i++) {
> +		frag = &skb_shinfo(skb)->frags[i];
> +		buff_len = frag->size;
>  		WARN_ON(!skb_frag_page(frag));
>  		addr = skb_frag_dma_map(dev, frag, 0,
> -					frag_len, dma_dir);
> +					buff_len, dma_dir);

And clearly the bug you are fixing is simply that frag_len was only
being set for the first fragment.

Please just fix that bug and remove all of these other completely
unrelated changes.

  reply	other threads:[~2018-02-20 18:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19 16:10 [PATCH net-next 0/4] DPAA Ethernet fixes Madalin Bucur
2018-02-19 16:10 ` [PATCH net-next 1/4] dpaa_eth: fix SG mapping Madalin Bucur
2018-02-20 18:56   ` David Miller [this message]
2018-02-19 16:10 ` [PATCH net-next 2/4] dpaa_eth: make sure all Rx errors are counted Madalin Bucur
2018-02-19 16:10 ` [PATCH net-next 3/4] dpaa_eth: refactor frag count checking Madalin Bucur
2018-02-19 16:10 ` [PATCH net-next 4/4] dpaa_eth: Add allmulti option Madalin Bucur

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=20180220.135616.822494587891051955.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=madalin.bucur@nxp.com \
    --cc=netdev@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®