From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Kelly Daly <kelly@au1.ibm.com>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, rusty@rustcorp.com.au
Subject: Re: [PATCH] Netchannel: default, find, add to socket
Date: Tue, 11 Jul 2006 09:57:08 +0400 [thread overview]
Message-ID: <20060711055708.GA3935@2ka.mipt.ru> (raw)
In-Reply-To: <200607111539.25458.kelly@au.ibm.com>
On Tue, Jul 11, 2006 at 03:39:25PM +1000, Kelly Daly (kelly@au1.ibm.com) wrote:
> Implement finding of correct netchannel for buffer, default netchannel and
> attach a netchannel to a socket
>
> Signed-off-by: Kelly Daly <kelly@au.ibm.com>
Hi Kelly.
You have a typo in the code commented below.
I have a question regarsing your netchannel design - as far as I can
see, you steal data in interrupts and then convert it into skb and run
through usual netif_receive_skb(). Thus you dedicate one thread (one
CPU) to do the whole processing for all sockets which do not have
netchannels bound to them. Did you benchmarked such approach both with
and without netchannel bound to the socket?
> +/* Find the channel for a packet, or return default channel. */
> +struct netchannel *find_netchannel(const struct netchannel_buftrailer *bp)
> +{
> + struct sock *sk = NULL;
> + int datalen = netchan_data_len(bp);
> +
> + switch (bp->netchan_buf_proto) {
> + case __constant_htons(ETH_P_IP): {
> + struct iphdr *ip = (void *)bp - datalen;
> + int iphl = ip->ihl * 4;
> +
> + /* FIXME: Do sanity checks, parse packet. */
> +
> + if (datalen >+ (iphl + 4) && iphl == sizeof(struct iphdr)) {
A typo ">+" instead of ">=".
--
Evgeniy Polyakov
next prev parent reply other threads:[~2006-07-11 5:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-11 5:39 [PATCH] Netchannel: default, find, add to socket Kelly Daly
2006-07-11 5:57 ` Evgeniy Polyakov [this message]
2006-07-11 6:14 ` Kelly Daly
2006-07-11 6:17 ` Kelly Daly
2006-07-26 0:21 ` David Miller
2006-07-11 7:37 ` David Miller
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=20060711055708.GA3935@2ka.mipt.ru \
--to=johnpol@2ka.mipt.ru \
--cc=davem@davemloft.net \
--cc=kelly@au1.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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).