All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bridge] Getting statistics from a bridge
@ 2008-04-23  0:53 Leigh Sharpe
  2008-04-23 17:43 ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: Leigh Sharpe @ 2008-04-23  0:53 UTC (permalink / raw)
  To: bridge

[-- Attachment #1: Type: text/plain, Size: 571 bytes --]

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
 
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
<blocked::mailto:lsharpe@pacificwireless.com.au> 
web www.pacificwireless.com.au
<blocked::http://www.pacificwireless.com.au/> 
 

[-- Attachment #2: Type: text/html, Size: 1458 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bridge] Getting statistics from a bridge
  2008-04-23  0:53 [Bridge] Getting statistics from a bridge Leigh Sharpe
@ 2008-04-23 17:43 ` Stephen Hemminger
  2008-04-24 13:41   ` Jaime Medrano
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2008-04-23 17:43 UTC (permalink / raw)
  To: Leigh Sharpe; +Cc: bridge

On Wed, 23 Apr 2008 10:53:12 +1000
"Leigh Sharpe" <lsharpe@pacificwireless.com.au> 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)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bridge] Getting statistics from a bridge
  2008-04-23 17:43 ` Stephen Hemminger
@ 2008-04-24 13:41   ` Jaime Medrano
  2008-04-28 18:10     ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: Jaime Medrano @ 2008-04-24 13:41 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: bridge

On Wed, Apr 23, 2008 at 10:43:40AM -0700, Stephen Hemminger wrote:
> On Wed, 23 Apr 2008 10:53:12 +1000
> "Leigh Sharpe" <lsharpe@pacificwireless.com.au> 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);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bridge] Getting statistics from a bridge
  2008-04-24 13:41   ` Jaime Medrano
@ 2008-04-28 18:10     ` Stephen Hemminger
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2008-04-28 18:10 UTC (permalink / raw)
  To: Jaime Medrano; +Cc: bridge

On Thu, 24 Apr 2008 15:41:29 +0200
Jaime Medrano <jaime.medrano@gmail.com> 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" <lsharpe@pacificwireless.com.au> 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-28 18:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23  0:53 [Bridge] Getting statistics from a bridge Leigh Sharpe
2008-04-23 17:43 ` Stephen Hemminger
2008-04-24 13:41   ` Jaime Medrano
2008-04-28 18:10     ` Stephen Hemminger

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.