All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	daniel@iogearbox.net, xiyou.wangcong@gmail.com,
	John Fastabend <john.r.fastabend@intel.com>
Subject: Re: [PATCH v3 net-next 1/1] net_sched: Introduce skbmod action
Date: Thu, 08 Sep 2016 09:02:53 -0700	[thread overview]
Message-ID: <1473350573.15733.61.camel@edumazet-glaptop3.roam.corp.google.com> (raw)
In-Reply-To: <6a0f8bfd-97d2-1e08-7ad7-b5791cb4312c@mojatatu.com>

On Thu, 2016-09-08 at 06:38 -0400, Jamal Hadi Salim wrote:
> On 16-09-06 10:25 AM, Eric Dumazet wrote:
> 
> >
> > Just use u16 in the array ?
> >
> > u16 tmpaddr[ETH_ALEN / 2]; /* ether_addr_copy() requirement */
> >
> > ether_addr_copy((u8 *)tmpaddr, eth_hdr(skb)->h_dest);
> > ...
> >
> 
> Ok - thanks Eric. BTW:
> Nobody has answered my other question:
> I can get stats to increment with:
> bstats_update(&d->tcf_bstats, skb);
> but not:
> bstats_cpu_update(this_cpu_ptr(d->common.cpu_bstats), skb);

This simply works for me.

But maybe you read the stats at the wrong place ?

Pleas give us more details, thanks !

lpaa24:~# tc -s action list action mirred ; tc -s -d qd sh dev ifb10

	action order 0: mirred (Egress Redirect to device ifb10) stolen
 	index 3 ref 1 bind 1 installed 18 sec
 	Action statistics:
	Sent 6647111559 bytes 4433436 pkt (dropped 0, overlimits 14473 requeues 0) 
	backlog 0b 0p requeues 0 
qdisc mq 1: root 
 Sent 6394816791 bytes 4225732 pkt (dropped 88025, overlimits 0 requeues 0) 
 backlog 108069552b 71406p requeues 0 
qdisc netem 8016: parent 1:5 limit 100000 delay 50.0ms loss 2%
 Sent 776873149 bytes 513412 pkt (dropped 10766, overlimits 0 requeues 0) 
 rate 721506Kbit 59595pps backlog 6952420b 4594p requeues 0 
qdisc netem 8018: parent 1:7 limit 100000 delay 50.0ms loss 2%
 Sent 1290830041 bytes 852967 pkt (dropped 18497, overlimits 0 requeues 0) 
 rate 1246Mbit 102941pps backlog 76607984b 50616p requeues 0 
qdisc netem 8013: parent 1:2 limit 100000 delay 50.0ms loss 2%
 Sent 783039400 bytes 517411 pkt (dropped 10512, overlimits 0 requeues 0) 
 rate 471897Kbit 38979pps backlog 688870b 455p requeues 0 
qdisc netem 8015: parent 1:4 limit 100000 delay 50.0ms loss 2%
 Sent 715503442 bytes 472806 pkt (dropped 9734, overlimits 0 requeues 0) 
 rate 432373Kbit 35713pps backlog 1627550b 1075p requeues 0 
qdisc netem 8019: parent 1:8 limit 100000 delay 50.0ms loss 2%
 Sent 735599060 bytes 486064 pkt (dropped 9915, overlimits 0 requeues 0) 
 rate 441280Kbit 36448pps backlog 2747910b 1815p requeues 0 
qdisc netem 8017: parent 1:6 limit 100000 delay 50.0ms loss 2%
 Sent 755679663 bytes 499311 pkt (dropped 10130, overlimits 0 requeues 0) 
 rate 445158Kbit 36765pps backlog 2174290b 1439p requeues 0 
qdisc netem 8014: parent 1:3 limit 100000 delay 50.0ms loss 2%
 Sent 689812958 bytes 455833 pkt (dropped 9583, overlimits 0 requeues 0) 
 rate 566772Kbit 46812pps backlog 13988176b 9244p requeues 0 
qdisc netem 8012: parent 1:1 limit 100000 delay 50.0ms loss 2%
 Sent 647479078 bytes 427928 pkt (dropped 8888, overlimits 0 requeues 0) 
 rate 559420Kbit 46207pps backlog 3282352b 2168p requeues 0 

  reply	other threads:[~2016-09-08 16:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-28 12:19 [PATCH v3 net-next 1/1] net_sched: Introduce skbmod action Jamal Hadi Salim
2016-08-28 14:48 ` Alexei Starovoitov
2016-08-29 10:35   ` Jamal Hadi Salim
2016-08-28 16:07 ` Eric Dumazet
2016-08-29  5:10   ` Cong Wang
2016-08-29 13:27     ` Eric Dumazet
2016-08-29 10:38   ` Jamal Hadi Salim
2016-08-29 11:00     ` Daniel Borkmann
2016-08-29 11:40       ` Jamal Hadi Salim
2016-08-29 11:55         ` Jamal Hadi Salim
2016-08-29 11:35     ` Jamal Hadi Salim
2016-08-29 18:20       ` Eric Dumazet
2016-08-30 11:12         ` Jamal Hadi Salim
2016-08-30 11:57           ` Jamal Hadi Salim
2016-08-30 12:35             ` Eric Dumazet
2016-09-06 12:03               ` Jamal Hadi Salim
2016-08-30 12:44             ` Eric Dumazet
2016-09-06 12:08               ` Jamal Hadi Salim
2016-09-06 14:25                 ` Eric Dumazet
2016-09-08 10:38                   ` Jamal Hadi Salim
2016-09-08 16:02                     ` Eric Dumazet [this message]
2016-09-08 16:11                       ` Eric Dumazet
2016-09-09 12:33                         ` Jamal Hadi Salim
2016-08-30 12:20           ` 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=1473350573.15733.61.camel@edumazet-glaptop3.roam.corp.google.com \
    --to=eric.dumazet@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=john.r.fastabend@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.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 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.