netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shmulik Ladkani <shmulik.ladkani@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 3/9] net: Move main gso loop out of dev_hard_start_xmit() into helper.
Date: Sat, 6 Sep 2014 17:38:08 +0300	[thread overview]
Message-ID: <20140906173808.049f18ed@halley> (raw)
In-Reply-To: <20140901.152450.815155429225102019.davem@davemloft.net>

Hi,

On Mon, 01 Sep 2014 15:24:50 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
> @@ -2681,25 +2709,7 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
>  	}
>  
>  gso:
> -	do {
> -		struct sk_buff *nskb = skb->next;
> -
> -		skb->next = nskb->next;
> -		nskb->next = NULL;
> -
> -		rc = xmit_one(nskb, dev, txq);
> -		if (unlikely(rc != NETDEV_TX_OK)) {
> -			if (rc & ~NETDEV_TX_MASK)
> -				goto out_kfree_gso_skb;
> -			nskb->next = skb->next;
> -			skb->next = nskb;
> -			return rc;
> -		}
> -		if (unlikely(netif_xmit_stopped(txq) && skb->next))
> -			return NETDEV_TX_BUSY;
> -	} while (skb->next);
> -
> -out_kfree_gso_skb:
> +	skb->next = xmit_list(skb->next, dev, txq, &rc);
>  	if (likely(skb->next == NULL)) {
>  		skb->destructor = DEV_GSO_CB(skb)->destructor;
>  		consume_skb(skb);
> 	}
> out_kfree_skb:
> 	kfree_skb(skb);

Formely, if 'netif_xmit_stopped(txq) && skb->next', NETDEV_TX_BUSY was
returned, but the head 'skb' wasn't freed;
Currently, if 'xmit_list' returns non-NULL due to same reason, head skb
gets freed in out_kfree_skb.

I'm not certain, but it looks like an oversight that got fixed later in
the patchset:
In net-next ce93718fb "net: Don't keep around original SKB when we
software segment GSO frames." the 'kfree_skb(skb)' in
'dev_hard_start_xmit' got relocated into validate_xmit_skb's gso
segmentation part, making the issue disappear.

Am I right? Didn't we miss anything else here?

      reply	other threads:[~2014-09-06 14:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-01 22:24 [PATCH 3/9] net: Move main gso loop out of dev_hard_start_xmit() into helper David Miller
2014-09-06 14:38 ` Shmulik Ladkani [this message]

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=20140906173808.049f18ed@halley \
    --to=shmulik.ladkani@gmail.com \
    --cc=davem@davemloft.net \
    --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;
as well as URLs for NNTP newsgroup(s).