Re: Fragment flooding in 2.4.x/2.5.x

From: kuznet@ms2.inr.ac.ru
Date: Thu Jun 27 2002 - 15:05:08 EST


Hello!

> > Did you not solve this problem using right write_space?
>
> Sure, I can add specific checks for (atomic_read(&sk->wmem_alloc) <
> sk->sndbuf) in the RPC layer,

But it is there now.

static void
udp_write_space(struct sock *sk)
{
        struct rpc_xprt *xprt;

        if (!(xprt = xprt_from_sock(sk)))
                return;
        if (xprt->shutdown)
                return;

        /* Wait until we have enough socket memory. */
        if (sock_writeable(sk))
                return;

So, I do not understand what you speak about.

> Sending partial messages isn't a feature
> that sounds like it would be particularly useful for any other applications
> either.

The thing, which is really useless, is that your patch preparing skbs
and dropping them in the next line. With the same success you could
trigger BUG() there. :-) Right application just should not reach
this condition.

Anyway, I have to repeat:

>>Better way exists. Just use forced sock_wmalloc instead of
>>sock_alloc_send_skb on non-blocking send of all the fragments
>>but the first.

> However what if the actual call to alloc_skb() fails?

The same as if it would be lost by network.

Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jun 30 2002 - 22:00:12 EST