From: "will fitzgerald" <linux_learning@yahoo.co.uk>
To: linux-kernel@vger.kernel.org
Cc: linux-c-programming@vger.kernel.org
Subject: this code does not get called in dev.c so do we need it?
Date: Wed, 2 Oct 2002 15:02:35 +0100 (BST) [thread overview]
Message-ID: <20021002140236.53405.qmail@web13107.mail.yahoo.com> (raw)
hi all,
this code excerpt from net_rx_action in dev.c does not
get executed at all. is there any need for it? what
does it do?
i inserted printk's in it just about everywhere.
i have a test network set up, A talks to C via router
B
(kernel 2.4.14)
justificattion:
i've pinged C from A, I've pinged eth0 on B from
A,I've pinged eth1 on B from A and i've pinged A from
router B and in no instance was any of the following
code executed.
whats CONFIG_NET_FASTROUTE supposed to do?
the only part that does get executed are the lines:
"skb->h.raw = skb->nh.raw = skb->data;
{struct packet_type *ptype, *pt_prev;
unsigned short type = skb->protocol;
pt_prev = NULL;" just after the
CONFIG_NET_FASTROUTE section of code.
#ifdef CONFIG_NET_FASTROUTE
if (skb->pkt_type == PACKET_FASTROUTE) {
netdev_rx_stat[this_cpu].fastroute_deferred_out++;
dev_queue_xmit(skb);
dev_put(rx_dev);
continue;
}
#endif
skb->h.raw = skb->nh.raw = skb->data;
{
struct packet_type *ptype, *pt_prev;
unsigned short type = skb->protocol;
pt_prev = NULL;
for (ptype = ptype_all; ptype; ptype = ptype->next)
{
if (!ptype->dev || ptype->dev == skb->dev) {
if (pt_prev) {
if (!pt_prev->data) {
deliver_to_old_ones(pt_prev, skb, 0);
} else {
atomic_inc(&skb->users);
pt_prev->func(skb,
skb->dev,
pt_prev);
}
}
pt_prev = ptype;
}
}
#ifdef CONFIG_NET_DIVERT
if (skb->dev->divert && skb->dev->divert->divert)
handle_diverter(skb);
#endif /* CONFIG_NET_DIVERT */
#if defined(CONFIG_BRIDGE) ||
defined(CONFIG_BRIDGE_MODULE)
if (skb->dev->br_port != NULL &&
br_handle_frame_hook != NULL) {
handle_bridge(skb, pt_prev);
dev_put(rx_dev);
continue;
}
#endif
if i'm wrong let me know,
thanks.
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
next reply other threads:[~2002-10-02 14:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-02 14:02 will fitzgerald [this message]
2002-10-03 0:10 ` this code does not get called in dev.c so do we need it? David S. Miller
2002-10-03 11:13 ` will fitzgerald
2002-10-03 11:14 ` David S. Miller
2002-10-03 20:14 ` nick
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=20021002140236.53405.qmail@web13107.mail.yahoo.com \
--to=linux_learning@yahoo.co.uk \
--cc=linux-c-programming@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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).