netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nieścierowicz Adam" <adam.niescierowicz@justnet.pl>
To: <netdev@vger.kernel.org>
Subject: tc action mirred packet lost
Date: Sun, 31 Oct 2010 13:44:08 +0100	[thread overview]
Message-ID: <aff638d83f21a1b8ab3e1911f2d3ac43@justnet.pl> (raw)

 Hello,
 recently there was a need to create 3-4 copies of the data sent to the 
 router, I decided to use the tc action mirred.


 Ingress traficn on eth1 copies to eth1 eth2, eth3, eth4, eth5 using:
 ---
 tc qdisc add dev eth1 ingress

 tc filter add dev eth1 parent ffff: protocol ip prio 10 u32 match ip 
 src
 0/0 flowid 1:1 action mirred egress mirror dev eth2 pipe action mirred
 egress mirror dev eth3 pipe action mirred egress mirror dev eth4 pipe
 action mirred egress mirror dev eth5
 --


 Unfortunately the number of packets seen on eth1 qdisc is different 
 than the eth [2-5]
 ---
 12:02:57 CET
 qdisc pfifo_fast 0: dev eth0 root refcnt 2 bands 3 priomap  1 2 2 2 1 2 
 0 0 1 1 1 1 1 1 1 1
  Sent 668167 bytes 6001 pkt (dropped 0, overlimits 0 requeues 0)
  backlog 0b 0p requeues 0
 qdisc pfifo_fast 0: dev eth1 root refcnt 2 bands 3 priomap  1 2 2 2 1 2 
 0 0 1 1 1 1 1 1 1 1
  Sent 36336 bytes 860 pkt (dropped 0, overlimits 0 requeues 0)
  backlog 0b 0p requeues 0
 qdisc ingress ffff: dev eth1 parent ffff:fff1 ----------------
  Sent 7221533005980 bytes 199468106 pkt (dropped 0, overlimits 0 
 requeues 0)
  backlog 0b 0p requeues 0
 qdisc htb 1: dev eth2 root refcnt 2 r2q 10 default 0 
 direct_packets_stat 197808186 ver 3.17
  Sent 7404614590804 bytes 197808186 pkt (dropped 0, overlimits 0 
 requeues 1976)
  backlog 0b 0p requeues 1976
 qdisc pfifo_fast 0: dev eth3 root refcnt 2 bands 3 priomap  1 2 2 2 1 2 
 0 0 1 1 1 1 1 1 1 1
  Sent 7404614590804 bytes 197808186 pkt (dropped 0, overlimits 0 
 requeues 2779)
  backlog 0b 0p requeues 2779
 qdisc pfifo_fast 0: dev eth4 root refcnt 2 bands 3 priomap  1 2 2 2 1 2 
 0 0 1 1 1 1 1 1 1 1
  Sent 7404614590804 bytes 197808186 pkt (dropped 0, overlimits 0 
 requeues 1958)
  backlog 0b 0p requeues 1958
 qdisc pfifo_fast 0: dev eth5 root refcnt 2 bands 3 priomap  1 2 2 2 1 2 
 0 0 1 1 1 1 1 1 1 1
  Sent 7404614590804 bytes 197808186 pkt (dropped 0, overlimits 0 
 requeues 3231)
  backlog 0b 0p requeues 3231

 12:03:07 CET
 qdisc pfifo_fast 0: dev eth0 root refcnt 2 bands 3 priomap  1 2 2 2 1 2 
 0 0 1 1 1 1 1 1 1 1
  Sent 669819 bytes 6003 pkt (dropped 0, overlimits 0 requeues 0)
  backlog 0b 0p requeues 0
 qdisc pfifo_fast 0: dev eth1 root refcnt 2 bands 3 priomap  1 2 2 2 1 2 
 0 0 1 1 1 1 1 1 1 1
  Sent 36336 bytes 860 pkt (dropped 0, overlimits 0 requeues 0)
  backlog 0b 0p requeues 0
 qdisc ingress ffff: dev eth1 parent ffff:fff1 ----------------
  Sent 7221762321336 bytes 199909173 pkt (dropped 0, overlimits 0 
 requeues 0)
  backlog 0b 0p requeues 0
 qdisc htb 1: dev eth2 root refcnt 2 r2q 10 default 0 
 direct_packets_stat 198249138 ver 3.17
  Sent 7404850074198 bytes 198249138 pkt (dropped 0, overlimits 0 
 requeues 1976)
  backlog 0b 0p requeues 1976
 qdisc pfifo_fast 0: dev eth3 root refcnt 2 bands 3 priomap  1 2 2 2 1 2 
 0 0 1 1 1 1 1 1 1 1
  Sent 7404850074198 bytes 198249138 pkt (dropped 0, overlimits 0 
 requeues 2779)
  backlog 0b 0p requeues 2779
 qdisc pfifo_fast 0: dev eth4 root refcnt 2 bands 3 priomap  1 2 2 2 1 2 
 0 0 1 1 1 1 1 1 1 1
  Sent 7404850074198 bytes 198249138 pkt (dropped 0, overlimits 0 
 requeues 1958)
  backlog 0b 0p requeues 1958
 qdisc pfifo_fast 0: dev eth5 root refcnt 2 bands 3 priomap  1 2 2 2 1 2 
 0 0 1 1 1 1 1 1 1 1
  Sent 7404850074198 bytes 198249138 pkt (dropped 0, overlimits 0 
 requeues 3232)
  backlog 0b 0p requeues 3232

 12:03:17 CET
 qdisc pfifo_fast 0: dev eth0 root refcnt 2 bands 3 priomap  1 2 2 2 1 2 
 0 0 1 1 1 1 1 1 1 1
  Sent 671439 bytes 6005 pkt (dropped 0, overlimits 0 requeues 0)
  backlog 0b 0p requeues 0
 qdisc pfifo_fast 0: dev eth1 root refcnt 2 bands 3 priomap  1 2 2 2 1 2 
 0 0 1 1 1 1 1 1 1 1
  Sent 36336 bytes 860 pkt (dropped 0, overlimits 0 requeues 0)
  backlog 0b 0p requeues 0
 qdisc ingress ffff: dev eth1 parent ffff:fff1 ----------------
  Sent 7221978715996 bytes 200334775 pkt (dropped 0, overlimits 0 
 requeues 0)
  backlog 0b 0p requeues 0
 qdisc htb 1: dev eth2 root refcnt 2 r2q 10 default 0 
 direct_packets_stat 198674650 ver 3.17
  Sent 7405072421886 bytes 198674650 pkt (dropped 0, overlimits 0 
 requeues 1976)
  backlog 0b 0p requeues 1976
 qdisc pfifo_fast 0: dev eth3 root refcnt 2 bands 3 priomap  1 2 2 2 1 2 
 0 0 1 1 1 1 1 1 1 1
  Sent 7405072421886 bytes 198674650 pkt (dropped 0, overlimits 0 
 requeues 2779)
  backlog 0b 0p requeues 2779
 qdisc pfifo_fast 0: dev eth4 root refcnt 2 bands 3 priomap  1 2 2 2 1 2 
 0 0 1 1 1 1 1 1 1 1
  Sent 7405072421886 bytes 198674650 pkt (dropped 0, overlimits 0 
 requeues 1958)
  backlog 0b 0p requeues 1958
 qdisc pfifo_fast 0: dev eth5 root refcnt 2 bands 3 priomap  1 2 2 2 1 2 
 0 0 1 1 1 1 1 1 1 1
  Sent 7405072421886 bytes 198674650 pkt (dropped 0, overlimits 0 
 requeues 3232)
  backlog 0b 0p requeues 3232
 ---


 also, each packet arriving at the filter is mirred
 ---
 filter protocol ip pref 10 u32
 filter protocol ip pref 10 u32 fh 800: ht divisor 1
 filter protocol ip pref 10 u32 fh 800::800 order 2048 key ht 800 bkt 0 
 flowid 1:1  (rule hit 422685 success 422685)
   match 00000000/00000000 at 12 (success 422685 )
         action order 1: mirred (Egress Mirror to device eth2) pipe
         index 9 ref 1 bind 1 installed 9 sec
         Action statistics:
         Sent 212219392 bytes 422685 pkt (dropped 0, overlimits 0 
 requeues 0)
         backlog 0b 0p requeues 0

         action order 2: mirred (Egress Mirror to device eth3) pipe
         index 10 ref 1 bind 1 installed 9 sec
         Action statistics:
         Sent 212219392 bytes 422685 pkt (dropped 0, overlimits 0 
 requeues 0)
         backlog 0b 0p requeues 0

         action order 3: mirred (Egress Mirror to device eth4) pipe
         index 11 ref 1 bind 1 installed 9 sec
         Action statistics:
         Sent 212219392 bytes 422685 pkt (dropped 0, overlimits 0 
 requeues 0)
         backlog 0b 0p requeues 0

         action order 4: mirred (Egress Mirror to device eth5) pipe
         index 12 ref 1 bind 1 installed 9 sec
         Action statistics:
         Sent 212219392 bytes 422685 pkt (dropped 0, overlimits 0 
 requeues 0)
         backlog 0b 0p requeues 0
 ---


 traffic on the interface is between 150-200Mbps
 ---
 ifstat -tb -i eth1,eth2,eth3,eth4,eth5
   Time           eth1                eth2                eth3           
  eth4                eth5
 HH:MM:SS   Kbps in  Kbps out   Kbps in  Kbps out   Kbps in  Kbps out   
 Kbps in  Kbps out   Kbps in  Kbps out
 12:32:13  188022.1      0.00      0.47  188016.0      0.00  188039.9    
 0.00  188016.0      0.00  188039.9
 12:32:14  188743.2      0.00      0.00  188736.6      0.00  188736.6    
 0.00  188736.6      0.00  188736.6
 12:32:15  195705.1      0.00      0.47  195700.9      0.00  195682.9    
 0.00  195682.9      0.00  195700.9
 12:32:16  183506.6      0.00      0.00  183516.1      0.00  183522.2    
 0.00  183522.2      0.00  183504.3
 ---

 Am I doing something wrong, or what is a purpose of packet loss.
 My plan is to mirror 800-900Mbps to 4-8 network devices.

 Thanks


             reply	other threads:[~2010-10-31 13:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-31 12:44 Nieścierowicz Adam [this message]
2010-11-01 11:15 ` tc action mirred packet lost Jarek Poplawski
2010-11-03  7:16   ` Nieścierowicz Adam

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=aff638d83f21a1b8ab3e1911f2d3ac43@justnet.pl \
    --to=adam.niescierowicz@justnet.pl \
    --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).