linux-newbie.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Prashant Batra <prbatra.lists@gmail.com>
To: linux-newbie@vger.kernel.org
Subject: Route lookup in ip_finish_output2
Date: Mon, 11 Feb 2013 14:24:59 +0530	[thread overview]
Message-ID: <5118B1E3.1040409@gmail.com> (raw)

Hi Folks,

I am trying to do a small hack into the kernel just for some 
experimentation wherein I need to do a ipv4 route lookup from 
ip_finish_output2, after the packet is received from outside and has got 
forwarded.

The route lookup is done using kernel API "ip_route_output_flow" with 
the flow having the dst address.
This seems to be working fine with only exception that at very high 
loads, I see certain CPU hikes and the profiling results show that the 
same API comes out to be the culprit.

What I understand is that even to take the forwarding decision the 
kernel ip_rcv should have done the route lookup to decide that the 
packet needs to be forwarded, then why am I seeing a CPU hike in my case.

The second route lookup is done as the original packet has got 
encapsulated within a new IP header having a different destination than 
the original packet.


Thanks,
Prashant
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

                 reply	other threads:[~2013-02-11  8:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=5118B1E3.1040409@gmail.com \
    --to=prbatra.lists@gmail.com \
    --cc=linux-newbie@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 read-only IMAP folder(s) and NNTP newsgroup(s).