<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Hello, everybody,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">I'm trying to develop a new Ethernet driver (Realtek) for Linux kernel 4.0.2. </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">[ 3.612938] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded</font></div><div style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div style="font-size:small"><span style="font-family:arial,helvetica,sans-serif">As part of my studies, I'm trying to trace the path for functions defined in </span><font face="monospace, monospace">drivers/net/ethernet/realtek/r8169.c, net/core/dev.c </font><font face="arial, helvetica, sans-serif">and </font><font face="monospace, monospace">net/core/dev_ioctl.c</font><font face="arial, helvetica, sans-serif">. I'm using "printks" for this purpose. For instance, something like: </font></div><div style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div style="font-size:small"><font face="monospace, monospace">printk("TEST: __dev_set_promiscuity\n");</font></div><div style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div style="font-size:small"><span style="font-family:arial,helvetica,sans-serif">However, I'm not getting what's going on. I can set/unset the promiscuity behaviour via </span><font face="monospace, monospace">ifconfig</font><font face="arial, helvetica, sans-serif"> command.</font></div><div style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div style><div style><font face="monospace, monospace">[ 131.330091] device eth0 entered promiscuous mode</font></div><div style><font face="monospace, monospace">[ 170.619086] device eth0 left promiscuous mode</font></div></div><div style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div style="font-size:small"><span style="font-family:arial,helvetica,sans-serif">By looking at the </span><font face="monospace, monospace">dmesg</font><span style="font-family:arial,helvetica,sans-serif"> output above, I thought the function that deals with promiscuity was </span><font face="monospace, monospace">__dev_set_promiscuity()</font><font face="arial, helvetica, sans-serif"> defined in </font><font face="monospace, monospace">net/core/dev.c,</font><font face="arial, helvetica, sans-serif"> because this function calls a function to print the message above:</font></div><div style="font-size:small"><font face="arial, helvetica, sans-serif"><br></font></div><div style="font-size:small"><div><font face="monospace, monospace">pr_info("device %s %s promiscuous mode\n", dev->name, dev->flags & IFF_PROMISC ? "entered" : "left");</font></div></div><div style="font-size:small"><font face="arial, helvetica, sans-serif"><br></font></div><div style="font-size:small"><font face="arial, helvetica, sans-serif">But, when I tried to look for my </font><font face="monospace, monospace">printk</font><font face="arial, helvetica, sans-serif"> message with </font><font face="monospace, monospace">dmesg</font><font face="arial, helvetica, sans-serif"> after compiling and running the kernel, I couldn't find it.</font></div><div style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div style="font-size:small"><font face="monospace, monospace">$ cd linux-4.0.2/</font></div><div style="font-size:small"><font face="monospace, monospace">$ make net && make modules</font></div><div style="font-size:small"><font face="monospace, monospace">$ sudo make modules_install && sudo make install</font></div></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Can somebody help me to understand what's happening?</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Thanks in advance,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><i>--<br></i>Airton Ishimori<i><br></i><div><div><br></div></div></div></div></div></div></div></div></div></div></div>
</div>