All of lore.kernel.org
 help / color / mirror / Atom feed
From: nobumasa.bcc@gmail.com (Airton Ishimori)
To: kernelnewbies@lists.kernelnewbies.org
Subject: A flow path for ethernet kernel driver
Date: Tue, 19 May 2015 11:09:23 -0300	[thread overview]
Message-ID: <CAHVg_i71pFOxztn-1bk6609LRfKgj2g6HHB3s60-i-xTWhRSTg@mail.gmail.com> (raw)
In-Reply-To: <CAK25hWOLgyWrK_yw+CUB0egUPyX_BHCJ3BdvZGiX30nsYvPB5A@mail.gmail.com>

Hi, Saket,

Thanks for the tip!


*--*Airton Ishimori


On Tue, May 19, 2015 at 2:53 AM, Saket Sinha <saket.sinha89@gmail.com>
wrote:

> HI ,
>
>    If you want to go further than just the printks, you can setup a
> qemu setup and attach gdb to it.
> Then you can even set breakpoints to analyze it.
>
> Let me know if you have any issues with the setup.
>
> Regards,
> Saket Sinha
>
>
> On Tue, May 19, 2015 at 11:18 AM, anish singh
> <anish198519851985@gmail.com> wrote:
> >
> >
> > On Mon, May 18, 2015 at 12:23 PM, Airton Ishimori <
> nobumasa.bcc at gmail.com>
> > wrote:
> >>
> >> Hello, everybody,
> >>
> >> I'm trying to develop a new Ethernet driver (Realtek) for Linux kernel
> >> 4.0.2.
> >>
> >> [    3.612938] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
> >>
> >> As part of my studies, I'm trying to trace the path for functions
> defined
> >> in drivers/net/ethernet/realtek/r8169.c, net/core/dev.c and
> >> net/core/dev_ioctl.c. I'm using "printks" for this purpose. For
> instance,
> >> something like:
> >>
> >> printk("TEST: __dev_set_promiscuity\n");
> >>
> >> However, I'm not getting what's going on. I can set/unset the
> promiscuity
> >> behaviour via ifconfig command.
> >>
> >> [  131.330091] device eth0 entered promiscuous mode
> >> [  170.619086] device eth0 left promiscuous mode
> >>
> >> By looking at the dmesg output above, I thought the function that deals
> >> with promiscuity was __dev_set_promiscuity() defined in net/core/dev.c,
> >> because this function calls a function to print the message above:
> >>
> >> pr_info("device %s %s promiscuous mode\n", dev->name, dev->flags &
> >> IFF_PROMISC ? "entered" : "left");
> >>
> >> But, when I tried to look for my printk message with dmesg after
> compiling
> >> and running the kernel, I couldn't find it.
> >>
> >> $ cd linux-4.0.2/
> >> $ make net && make modules
> >> $ sudo make modules_install && sudo make install
> >>
> >> Can somebody help me to understand what's happening?
> >
> >
> > There are only two reasons why your printk is not coming
> > 1. Your printk is not executing.
> > 2. Your driver is not getting installed.
> > Have you verified both of these points?
> >>
> >>
> >> Thanks in advance,
> >>
> >> --
> >> Airton Ishimori
> >>
> >>
> >> _______________________________________________
> >> Kernelnewbies mailing list
> >> Kernelnewbies at kernelnewbies.org
> >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >>
> >
> >
> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies at kernelnewbies.org
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150519/a76fe761/attachment.html 

  reply	other threads:[~2015-05-19 14:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18 19:23 A flow path for ethernet kernel driver Airton Ishimori
2015-05-18 20:01 ` Rami Rosen
2015-05-18 23:11   ` Airton Ishimori
2015-05-19  5:48 ` anish singh
2015-05-19  5:53   ` Saket Sinha
2015-05-19 14:09     ` Airton Ishimori [this message]
2015-05-19 14:08   ` Airton Ishimori

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=CAHVg_i71pFOxztn-1bk6609LRfKgj2g6HHB3s60-i-xTWhRSTg@mail.gmail.com \
    --to=nobumasa.bcc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.