netdev
[Top] [All Lists]

Re: [patch 4/10] s390: network driver.

To: Peter Buckingham <peter@xxxxxxxxxxxx>
Subject: Re: [patch 4/10] s390: network driver.
From: jamal <hadi@xxxxxxxxxx>
Date: 17 Jan 2005 17:36:26 -0500
Cc: Tommy Christensen <tommy.christensen@xxxxxxxxx>, Hasso Tepper <hasso@xxxxxxxxx>, Jeff Garzik <jgarzik@xxxxxxxxx>, Thomas Spatzier <thomas.spatzier@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, netdev@xxxxxxxxxxx, Paul Jakma <paul@xxxxxxxx>
In-reply-to: <41EC3894.9090304@pantasys.com>
Organization: jamalopolous
References: <OFB7F7E23F.EFB88418-ONC1256F7E.0031769E-C1256F7E.003270AD@de.ibm.com> <1105363092.1041.146.camel@jzny.localdomain> <1105917038.1091.1041.camel@jzny.localdomain> <200501171404.19451.hasso@estpak.ee> <41EC3680.7060108@tpack.net> <41EC3894.9090304@pantasys.com>
Reply-to: hadi@xxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
Hi there,

The solution that Tommy and myself have been batting around is a lot
more cleaner than this (however still doesnt solve the issue 100%)

cheers,
jamal

On Mon, 2005-01-17 at 17:13, Peter Buckingham wrote:
> Hi,
> 
> Tommy Christensen wrote:
> > A proper solution would take care of both these issues: "stale packets"
> > and "socket blocking". They are pretty much related.
> > 
> > Using a socket for each interface *ought* not be needed.
> > Carrier detection sounds like a good thing in its own right.
> 
> I came across this same problem with multicast/unicast with an e1000. 
> For a quick hack we just check to see whether the carrier is ok, if it's 
> not we just drop the packet. this might do some nasty things with tcp 
> and it may be better to check to see wither the socket buffer is full, 
> but this works for me here... (this is against a 2.6.9ish kernel)
> 
> peter
> 
> Index: net/core/dev.c
> ===================================================================
> --- net/core/dev.c
> +++ net/core/dev.c
> @@ -1379,6 +1379,11 @@
>   #ifdef CONFIG_NET_CLS_ACT
>       skb->tc_verd = SET_TC_AT(skb->tc_verd,AT_EGRESS);
>   #endif
> +     if (!netif_carrier_ok(dev)) {
> +             rc = NET_XMIT_DROP;
> +             goto out_kfree_skb;
> +     }
> +
>       if (q->enqueue) {
>               /* Grab device queue */
>               spin_lock(&dev->queue_lock);
> 
> 


<Prev in Thread] Current Thread [Next in Thread>