From mboxrd@z Thu Jan 1 00:00:00 1970 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C8A4DC.6830FEE0" Date: Wed, 23 Apr 2008 10:53:12 +1000 Message-ID: <96CF49BD8B56384395D698BA99007FA32FA1E1@exchange.pacwire.local> From: "Leigh Sharpe" Subject: [Bridge] Getting statistics from a bridge List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: bridge@lists.linux-foundation.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C8A4DC.6830FEE0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi All, Is there any way of getting detailed statistics from a bridge? Specifically, I need to know how many frames may have been dropped because they exceed the MTU of the underlying port. I'm having a few issues with MTUs not agreeing. =20 Regards, Leigh =20 Leigh Sharpe Network Systems Engineer Pacific Wireless Ph +61 3 9584 8966 Mob 0408 009 502 Helpdesk 1300 300 616 email lsharpe@pacificwireless.com.au =20 web www.pacificwireless.com.au =20 =20 ------_=_NextPart_001_01C8A4DC.6830FEE0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hi=20 All,
 Is there any=20 way of getting detailed statistics from a bridge?
Specifically, I need=20 to know how many frames may have been dropped because they exceed the = MTU of the=20 underlying port. I'm having a few issues with MTUs not=20 agreeing.
 
Regards,
        &nbs= p;   =20 Leigh
 
Leigh Sharpe
Network Systems = Engineer
Pacific=20 Wireless
Ph +61 3 9584 8966
Mob 0408 009 502
Helpdesk 1300 300 616
email lsharpe@pacificwi= reless.com.au
web=20 www.pacificwireless.= com.au
 
------_=_NextPart_001_01C8A4DC.6830FEE0-- From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 23 Apr 2008 10:43:40 -0700 From: Stephen Hemminger Message-ID: <20080423104340.2416280e@extreme> In-Reply-To: <96CF49BD8B56384395D698BA99007FA32FA1E1@exchange.pacwire.local> References: <96CF49BD8B56384395D698BA99007FA32FA1E1@exchange.pacwire.local> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Bridge] Getting statistics from a bridge List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leigh Sharpe Cc: bridge@lists.linux-foundation.org On Wed, 23 Apr 2008 10:53:12 +1000 "Leigh Sharpe" wrote: > Hi All, > Is there any way of getting detailed statistics from a bridge? > Specifically, I need to know how many frames may have been dropped > because they exceed the MTU of the underlying port. I'm having a few > issues with MTUs not agreeing. > > Regards, > Leigh > It would not be hard to modify kernel to use one of the existing statistics on the bridge interface to keep track of the dropped packets. I'll look into it if no one else gets to it first (hint, hint) From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 24 Apr 2008 15:41:29 +0200 From: Jaime Medrano Message-ID: <20080424134129.GA27496@localhost> References: <96CF49BD8B56384395D698BA99007FA32FA1E1@exchange.pacwire.local> <20080423104340.2416280e@extreme> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080423104340.2416280e@extreme> Subject: Re: [Bridge] Getting statistics from a bridge List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stephen Hemminger Cc: bridge@lists.linux-foundation.org On Wed, Apr 23, 2008 at 10:43:40AM -0700, Stephen Hemminger wrote: > On Wed, 23 Apr 2008 10:53:12 +1000 > "Leigh Sharpe" wrote: > > > Is there any way of getting detailed statistics from a bridge? > > Specifically, I need to know how many frames may have been dropped > > because they exceed the MTU of the underlying port. I'm having a few > > issues with MTUs not agreeing. > > It would not be hard to modify kernel to use one of the existing statistics on > the bridge interface to keep track of the dropped packets. I'll look into it > if no one else gets to it first (hint, hint) > I think this change will do it. Regards, Jaime Medrano. --- linux-2.6.25.orig/net/bridge/br_forward.c 2008-04-24 11:04:32.000000000 +0200 +++ linux-2.6.25/net/bridge/br_forward.c 2008-04-24 15:15:02.000000000 +0200 @@ -35,9 +35,10 @@ int br_dev_queue_push_xmit(struct sk_buff *skb) { /* drop mtu oversized packets except gso */ - if (packet_length(skb) > skb->dev->mtu && !skb_is_gso(skb)) + if (packet_length(skb) > skb->dev->mtu && !skb_is_gso(skb)) { + rcu_dereference(skb->dev->br_port)->br->statistics.tx_dropped++; kfree_skb(skb); - else { + } else { /* ip_refrag calls ip_fragment, doesn't copy the MAC header. */ if (nf_bridge_maybe_copy_header(skb)) kfree_skb(skb); From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 28 Apr 2008 11:10:24 -0700 From: Stephen Hemminger Message-ID: <20080428111024.2ff2fd78@extreme> In-Reply-To: <20080424134129.GA27496@localhost> References: <96CF49BD8B56384395D698BA99007FA32FA1E1@exchange.pacwire.local> <20080423104340.2416280e@extreme> <20080424134129.GA27496@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Bridge] Getting statistics from a bridge List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jaime Medrano Cc: bridge@lists.linux-foundation.org On Thu, 24 Apr 2008 15:41:29 +0200 Jaime Medrano wrote: > On Wed, Apr 23, 2008 at 10:43:40AM -0700, Stephen Hemminger wrote: > > On Wed, 23 Apr 2008 10:53:12 +1000 > > "Leigh Sharpe" wrote: > > > > > Is there any way of getting detailed statistics from a bridge? > > > Specifically, I need to know how many frames may have been dropped > > > because they exceed the MTU of the underlying port. I'm having a few > > > issues with MTUs not agreeing. > > > > It would not be hard to modify kernel to use one of the existing statistics on > > the bridge interface to keep track of the dropped packets. I'll look into it > > if no one else gets to it first (hint, hint) > > > > I think this change will do it. > > Regards, > Jaime Medrano. There is still the possiblity of RCU race during removal. I'll fix it up. I am adding better statistics as part of other patch.