All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamal Hadi Salim <jhs@mojatatu.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Florian Westphal <fw@strlen.de>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	netdev@vger.kernel.org, daniel@iogearbox.net
Subject: Re: [PATCH -next] net: core: set qdisc pkt len before tc_classify
Date: Wed, 13 May 2015 07:07:47 -0400	[thread overview]
Message-ID: <55533083.6070504@mojatatu.com> (raw)
In-Reply-To: <55532F5A.5070007@mojatatu.com>

On 05/13/15 07:02, Jamal Hadi Salim wrote:
>
>
> I dont think we need the stab on the ingress but we do need to account
> for gso. So option #1 with qdisc_pkt_len_init() alone is the only thing
> needed. i.e Florian's change becomes:
>
> -    qdisc_bstats_update_cpu(cl->q, skb);
> +    qdisc_pkt_len_init(skb)
>       skb->tc_verd = SET_TC_AT(skb->tc_verd, AT_INGRESS);
> +    qdisc_bstats_update_cpu(cl->q, skb);
>
> Alexei, why do you say this option will have overhead?
>

and the comment in qdisc_pkt_len_init() needs fixing too.
It says:
         /* To get more precise estimation of bytes sent on wire,
          * we add to pkt_len the headers size of all segments
          */


It implies transmit direction only - modern nics do set this
on receive.  Something like:

         /* To get more precise estimation of bytes rx or to be sent
           on the wire, we add to pkt_len the headers size of
           all segments
         */

cheers,
jamal

  reply	other threads:[~2015-05-13 11:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 13:37 [PATCH -next] net: core: set qdisc pkt len before tc_classify Florian Westphal
2015-05-12 14:22 ` Eric Dumazet
2015-05-12 15:16   ` Florian Westphal
2015-05-12 17:03     ` Alexei Starovoitov
2015-05-13 11:02       ` Jamal Hadi Salim
2015-05-13 11:07         ` Jamal Hadi Salim [this message]
2015-05-13 13:10         ` Eric Dumazet

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=55533083.6070504@mojatatu.com \
    --to=jhs@mojatatu.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=eric.dumazet@gmail.com \
    --cc=fw@strlen.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.