kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: llj098@gmail.com (lijin liu)
To: kernelnewbies@lists.kernelnewbies.org
Subject: struct sock change in kernel 2.6
Date: Thu, 23 Dec 2010 13:19:23 +0800	[thread overview]
Message-ID: <AANLkTimxz-X1pFrPawFrN+dHp0k4YbrKnhK5we9Tr7aA@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=QcD2p+paS0bUMfgx5kR9t1rC_ScPLsP+0dy=q@mail.gmail.com>

On Thu, Dec 23, 2010 at 1:16 PM, Mulyadi Santosa
<mulyadi.santosa@gmail.com> wrote:
> On Thu, Dec 23, 2010 at 07:18, lijin liu <llj098@gmail.com> wrote:
>> After reading the source code, comparing the codes of the two versions
>> I got the answer:
>>
>> 1.We can use sk_wq->wait instead of sk_wait.
>> 2.Use reqsk_queue_empty(struct request_sock_queue*) to check if there
>> is a new connection to accept. (thsi method is in net/request_sock.h)
>> we can use it like:
>>
>> ? ? ? ?struct inet_connection_sock *isock = inet_csk(socket->sk);
>> ? ? ? ?if(reqsk_queue_empty(&isock->icsk_accept_queue)){
>> ? ? ? ? ? ? ? ? //sleep here
>> ? ? ? ?}
>
> Thanks for sharing :) I believe you're intention is porting that code
> to latest kernel version, right?
>
> Then, i humbly suggest that you contribute the porting back to the
> original project. Who knows, that way many people will get the
> advantage and indirectly you got the benefit too: you become popular
> :)
>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
>

I will try when I am free. Thanks!

:)

      reply	other threads:[~2010-12-23  5:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22  6:17 struct sock change in kernel 2.6 lijin liu
2010-12-22 16:31 ` Bharath H S
2010-12-23  0:18   ` lijin liu
2010-12-23  5:16     ` Mulyadi Santosa
2010-12-23  5:19       ` lijin liu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTimxz-X1pFrPawFrN+dHp0k4YbrKnhK5we9Tr7aA@mail.gmail.com \
    --to=llj098@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).