public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Pravin B Shelar <pshelar@nicira.com>
Cc: netdev@vger.kernel.org, edumazet@google.com, jesse@nicira.com,
	bhutchings@solarflare.com, mirqus@gmail.com
Subject: Re: [PATCH net-next 3/3] v4 GRE: Add TCP segmentation offload for GRE
Date: Fri, 15 Feb 2013 06:41:00 -0800	[thread overview]
Message-ID: <1360939260.19353.2.camel@edumazet-glaptop> (raw)
In-Reply-To: <1360886561-1630-1-git-send-email-pshelar@nicira.com>

On Thu, 2013-02-14 at 16:02 -0800, Pravin B Shelar wrote:

> +	err = ip_local_out(skb);
> +	if (likely(net_xmit_eval(err) == 0)) {
> +		int pkt_len = skb->len - skb_transport_offset(skb);
> +		u64_stats_update_begin(&tstats->syncp);
> +		tstats->tx_bytes += pkt_len;
> +		tstats->tx_packets++;
> +		u64_stats_update_end(&tstats->syncp);
> +	} else {
> +		dev->stats.tx_errors++;
> +		dev->stats.tx_aborted_errors++;
> +	}
>  	return NETDEV_TX_OK;

Once given to ip_local_out(), you cant reference the skb anymore,
therefore you must evaluate pkt_len before :

pkt_len = skb->len - skb_transport_offset(skb);
err = ip_local_out(skb);
if (likely(net_xmit_eval(err) == 0)) {
    ...

      reply	other threads:[~2013-02-15 14:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-15  0:02 [PATCH net-next 3/3] v4 GRE: Add TCP segmentation offload for GRE Pravin B Shelar
2013-02-15 14:41 ` Eric Dumazet [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=1360939260.19353.2.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=bhutchings@solarflare.com \
    --cc=edumazet@google.com \
    --cc=jesse@nicira.com \
    --cc=mirqus@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@nicira.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