From: "Adam Khan" <adam.khan@cavium.com>
To: "'Martin Gadbois'" <martin.gadbois@colubris.com>,
<linux-kernel@vger.kernel.org>
Cc: <design@lists.freeswan.org>
Subject: RE: [Design] suggestions for parallel processing of input and output packets
Date: Fri, 5 Apr 2002 16:28:26 -0800 [thread overview]
Message-ID: <000001c1dd01$f83d0960$4310a8c0@Adamspc> (raw)
In-Reply-To: <3CAD9CDB.1F0C5D2F@colubris.com>
Martin,
Thanks for the info, extremely helpful. I have a couple more questions.
The ipsec_tunnel_start_xmit() and ipsec_rcv() routines run as tasklets.
In tasklets there is no sleeping or scheduling, From your notes
I can use a kernel thread (BTW, a timer routine would sleep -
I don't think thats allowed in this context?)
Kernel thread - Is this considered a separate context? Concerns -does
the thread sleep - how often is the thread run?
Pointers on with kernel threads and sample code will be appreciated.
Tia,
Adam
>
> Adam Khan wrote:
>
> > It appears that you handle multiple packets using the interrupt
> > generated by the hardware - I don't have an interrupt.
> > My question is if I can for example, in the FS code spawn a kernel
> > thread that has a function that polls for completion of the
decryption
> > and can forward the result via netif_rx. Simarlarly for the
encryption
> > process a thread to poll/monitor the hardware and then forward the
> > results via ip_send. This way I can make multiple processing
requests to
> > the hardware.
>
> No problems.
> You can emulate H/W easily with software:
> - on requests, pass packet to you H/W engine, start a recurring timer
> - on timer, check if encryption is done, if so call the callback of
the
> crypto engine (that will send the packet to the other part (either rx
or
> tx)
> - You handle queues your way, to allow for multithread your
encryption.
>
> In other words, the hardware interrupts only:
> - Get packet from H/W
> - Call the callback associated with the request.
> That can be done with a timer or a kernel thread. There is no
necessity to
> have H/W interrupt.
>
>
next parent reply other threads:[~2002-04-06 0:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3CAD9CDB.1F0C5D2F@colubris.com>
2002-04-06 0:28 ` Adam Khan [this message]
2002-04-08 12:29 ` Martin Gadbois
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='000001c1dd01$f83d0960$4310a8c0@Adamspc' \
--to=adam.khan@cavium.com \
--cc=design@lists.freeswan.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.gadbois@colubris.com \
/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
all inboxes | Powered by JetHome®