Re: [PATCH] new UDPCP Communication Protocol

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric Dumazet
Date: Saturday, January 1, 2011 - 3:23 pm

Le samedi 01 janvier 2011 à 22:44 +0100, stefani@seibold.net a écrit :

Hi Stefani

1) Please base your next trys on net-next-2.6 : This is the reference
for stuff like that. It probably does not matter a lot, but still...


2) I still see some _irq() variants of spinlock(). Its not necessary in
network stack at the level you are working (process context, and
softirqs)

Please only use _bh() variants, it's enough.

3) I see UDPLITE references in your code. Are you sure UDPCP protocol
can really work on top of UDPLITE ? I think not, so please remove dead
code.

4) udpcp_release_sock() seems expensive to me. Why not testing
usk->timeout before releasing sock lock, and save a lock/unlock pair ?

static inline void udpcp_release_sock(struct sock *sk)
{
	struct udpcp_sock *usk = udpcp_sk(sk);

	if (usk->timeout)
		udpcp_handle_timeout(sk);
	release_sock(sk);
}

5) In udpcp_timeout(), if you find socket is locked by user, you set
timeout to one and rearm a timer to udpcp_timer(sk, jiffies + 1); 

Why is it needed, since user process is going to handle the timeout
indication from udpcp_release_sock() ?

Thanks


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] new UDPCP Communication Protocol, stefani, (Sat Jan 1, 2:44 pm)
Re: [PATCH] new UDPCP Communication Protocol, Eric Dumazet, (Sat Jan 1, 3:23 pm)
Re: [PATCH] new UDPCP Communication Protocol, Stefani Seibold, (Sun Jan 2, 4:17 am)
Re: [PATCH] new UDPCP Communication Protocol, Eric Dumazet, (Sun Jan 2, 4:33 am)
Re: [PATCH] new UDPCP Communication Protocol, Stefani Seibold, (Sun Jan 2, 4:57 am)