| To: | Pablo Neira <pablo@xxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] Improve behaviour of Netlink Sockets |
| From: | Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> |
| Date: | Wed, 29 Sep 2004 09:19:06 +1000 |
| Cc: | hadi@xxxxxxxxxx, "David S. Miller" <davem@xxxxxxxxxx>, netdev@xxxxxxxxxxx |
| In-reply-to: | <4159D278.4060809@xxxxxxxxxxx> |
| References: | <1096289189.1075.37.camel@xxxxxxxxxxxxxxxx> <20040927213607.GD7243@xxxxxxxxxxxxxxxxxxx> <1096339407.8660.33.camel@xxxxxxxxxxxxxxxx> <20040928024614.GA9911@xxxxxxxxxxxxxxxxxxx> <1096340772.8659.51.camel@xxxxxxxxxxxxxxxx> <20040928032321.GB10116@xxxxxxxxxxxxxxxxxxx> <1096343125.8661.96.camel@xxxxxxxxxxxxxxxx> <20040928035921.GA10675@xxxxxxxxxxxxxxxxxxx> <1096367787.8662.146.camel@xxxxxxxxxxxxxxxx> <4159D278.4060809@xxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.5.6+20040722i |
On Tue, Sep 28, 2004 at 11:07:04PM +0200, Pablo Neira wrote: > > If buffer overruns we lost all the messages which are enqueued, so This is not true. You will get an ENOBUFS error but the packets that have already been queued are still on the queue if you want to read them. > ===== net/netlink/af_netlink.c 1.58 vs edited ===== > --- 1.58/net/netlink/af_netlink.c Sat Sep 25 17:43:43 2004 > +++ edited/net/netlink/af_netlink.c Tue Sep 28 22:23:44 2004 > @@ -475,7 +475,7 @@ > if (nlk->handler) > return 0; > #endif > - if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf || > + if (atomic_read(&sk->sk_rmem_alloc) + skb->len > sk->sk_rcvbuf || I don't see the point of this patch. All it does is make the overrun happen one packet earlier. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt |
| Previous by Date: | Re: RFC/PATCH capture qdisc requeue event in stats, David S. Miller |
|---|---|
| Next by Date: | Re: [PATCH] Improve behaviour of Netlink Sockets, David S. Miller |
| Previous by Thread: | Re: [PATCH] Improve behaviour of Netlink Sockets, Pablo Neira |
| Next by Thread: | Re: [PATCH] Improve behaviour of Netlink Sockets, David S. Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |