[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1360939260.19353.2.camel@edumazet-glaptop>
Date: Fri, 15 Feb 2013 06:41:00 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Pravin B Shelar <pshelar@...ira.com>
Cc: netdev@...r.kernel.org, edumazet@...gle.com, jesse@...ira.com,
bhutchings@...arflare.com, mirqus@...il.com
Subject: Re: [PATCH net-next 3/3] v4 GRE: Add TCP segmentation offload for
GRE
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)) {
...
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists