David Miller wrote: > From: Hideo AOKI <[EMAIL PROTECTED]> > Date: Sat, 15 Dec 2007 00:07:44 -0500 > >> Changelog take 9 -> take 10: >> * supported using sk_forward_alloc >> * introduced several memory accounting functions with spin lock >> * changed detagram receive functions to be able to customize >> destructor >> * fixed accounting bugs in previous takes > > This is not what Herbert and I meant with our suggestion. > > We meant to convert all of UDP and datagram handling to lock > sockets precisely like TCP does, by calling lock_sock() > on entry to functions like udp_recvmsg() and release_sock() > on exit from those functions. > > Then in the packet input processing, a sequence, just like > TCP, such as: > > bh_lock_sock_nested(sk); > if (!sock_owned_by_user(sk)) { > udp_do_rcv(sk, skb); > } else > sk_add_backlog(sk, skb); > > Then a suitably defined ->backlog_rcv is hooked up for these > protocols as well. > > Again, use TCP as a guide. > > There is much more work involved to implement this properly, > and make the accounting code sharable with TCP, than the > simplistic and minimal spin lock code you added here. > > Please do this correctly, thank you.
Hello, I appreciate your suggestions. I'll try to re-implement locking mechanism like TCP. Regards, Hideo -- Hitachi Computer Products (America) Inc. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html