From: Paul LeoNerd Evans <leonerd@leonerd.org.uk>
To: Jay Vosburgh <fubar@us.ibm.com>, netdev@vger.kernel.org
Subject: Re: Packet capture and Bonding asymmetries
Date: Fri, 11 Jun 2010 13:18:38 +0100 [thread overview]
Message-ID: <20100611121838.GC11110@cel.leo> (raw)
In-Reply-To: <17501.1276123951@death.nxdomain.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2165 bytes --]
On Wed, Jun 09, 2010 at 03:52:31PM -0700, Jay Vosburgh wrote:
> For your own private testing, you could add a call to
> __netif_nit_deliver in netif_receive_skb prior to this part:
>
> master = ACCESS_ONCE(orig_dev->master);
> if (master) {
> if (skb_bond_should_drop(skb, master))
> null_or_orig = orig_dev; /* deliver only exact match */
> else
> skb->dev = master;
> }
>
> This will give you multiple captures of the same packet, as is
> seen for transmit (i.e., one on the slave, one on the bond). For
> non-bonding devices, tcpdump will see each packet twice on the same
> device, so it's not really suitable for general use.
As per my last post, I've just tested the following patch and found it
to work just fine:
# pktdump -f "icmp" -n
[13:04:30] RX(eth0): ICMP| 192.168.56.1->192.168.56.6 echo-request seq=1
[13:04:30] RX(bond0): ICMP| 192.168.56.1->192.168.56.6 echo-request seq=1
[13:04:30] TX(bond0): ICMP| 192.168.56.6->192.168.56.1 echo-reply seq=1
[13:04:30] TX(eth0): ICMP| 192.168.56.6->192.168.56.1 echo-reply seq=1
I'll resubmit the patch properly for latest kernel version; this being
2.6.31.12 doesn't apply cleanly to upstream:
-----
--- linux-2.6.31.12-router/net/core/dev.c 2010-01-18 18:30:45.000000000 +0000
+++ linux-2.6.31.12-router_leobonding/net/core/dev.c 2010-06-11 12:39:43.000000000 +0100
@@ -2265,6 +2265,7 @@
null_or_orig = NULL;
orig_dev = skb->dev;
if (orig_dev->master) {
+ netif_nit_deliver(skb);
if (skb_bond_should_drop(skb))
null_or_orig = orig_dev; /* deliver only exact match */
else
-----
This patch quite deliberately includes packets arriving from non-active
bonding slaves, because the intention of tcpdump, pktdump, et.al., is to
see "close to the wire"; a view of what's happening down that physical
ethernet cable.
--
Paul "LeoNerd" Evans
leonerd@leonerd.org.uk
ICQ# 4135350 | Registered Linux# 179460
http://www.leonerd.org.uk/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
prev parent reply other threads:[~2010-06-11 12:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-09 21:27 Packet capture and Bonding asymmetries Paul LeoNerd Evans
2010-06-09 22:52 ` Jay Vosburgh
2010-06-10 12:10 ` Paul LeoNerd Evans
2010-06-11 12:18 ` Paul LeoNerd Evans [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=20100611121838.GC11110@cel.leo \
--to=leonerd@leonerd.org.uk \
--cc=fubar@us.ibm.com \
--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).