From: hdf3@comcast.net (don fisher)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Problem with netconsole and eth0 timing
Date: Wed, 26 Sep 2018 21:38:27 -0700 [thread overview]
Message-ID: <f3432c4b-219f-b121-be3c-badff96821ac@comcast.net> (raw)
In-Reply-To: <105446.1537997610@turing-police.cc.vt.edu>
On 9/26/18 2:33 PM, valdis.kletnieks at vt.edu wrote:
> On Wed, 26 Sep 2018 13:25:35 -0700, don fisher said:
>> Would you tell me how to tell the driver that it is to be eth0, ip
>> address etc. Maybe on linux command line, but I do not know the format.
>
> To quote some guy named Don Fisher:
>
>> my kernel and including the proper command (as shown below) in the linux boot string:
>> netconsole=64001 at 192.168.7.60/eth0,64001 at 192.168.7.55/34:e6:d7:01:2a:dd
>
> That's how. The netconsole command gets the info it needs from there, and tells
> the network layer how to configure the ethernet device and the network layer -
> although mostly the network layer. And the devices will auto-name themselves
> during boot, so all you need to do is know *which* name the kernel gives to the
> port you want to use, and then use that name.
>
> So grovel around in dmesg, and look for lines like (2 examples I have handy here)
>
> grep eth /var/log/dmesg
> [ 7.278395] igb 0000:07:00.0: added PHC on eth0
> [ 7.278398] igb 0000:07:00.0: eth0: (PCIe:5.0Gb/s:Width x2) 24:6e:96:10:db:64
> [ 7.278916] igb 0000:07:00.0: eth0: PBA No: G61346-000
> [ 7.368911] igb 0000:07:00.1: added PHC on eth1
> [ 7.368913] igb 0000:07:00.1: eth1: (PCIe:5.0Gb/s:Width x2) 24:6e:96:10:db:65
> [ 7.369372] igb 0000:07:00.1: eth1: PBA No: G61346-000
>
> dmesg | grep eth
> [ 2.642006] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) f0:1f:af:0c:8a:da
> [ 2.642076] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
> [ 2.642118] e1000e 0000:00:19.0 eth0: MAC: 10, PHY: 11, PBA No: 7011FF-0FF
> [ 5.071095] e1000e 0000:00:19.0 eno1: renamed from eth0
> [ 44.516004] e1000e 0000:00:19.0 eth0: renamed from eno1
>
> And find the one that has the MAC address of the port you want to use. Note
> that you want the kernel-assigned device name, not the one that udev/systemd
> finally assign to the device. So for the second example (my laptop), you'd want
> either the eth0 or eno1 name (depending which one was in effect when the
> netconsole module initializes. The initial eth0 is from pci enumeration, the
> rename to eno1 is courtesy of the kernel, and then the rename back to eth0 by
> systemd. Some experimentation may be needed (I've got a few servers that have
> 4 1G ports on the motherboard and multiple 10G/40G dual-port cards, so
> sometimes the port wired to our management network ends up at eth6 or eth7...)
>
> So if the port you want to use gets named eth4 by the kernel, you use
> netconsole=64001 at 192.168.7.60/eth4,64001 at 192.168.7.55/34:e6:d7:01:2a:dd
>
> (Gory ethernet details follow :)
>
> Remember that strictly speaking, the ethernet device itself doesn't *need* to
> know what its IP address is - it only needs to know its own MAC address so it
> knows which packets on the wire to accept to hand to the network stack, and
> *maybe* a list of other MAC addresses it should accept.
>
> And the hardware already knows its own MAC address.. :)
>
> You can get ethernet devices working with a *very* small set of functions:
>
> 0) Tell the kernel your hardware state (link/no link, MAC address, a few other things)
> 1) Receive packets for your own MAC address
> 2) Receive broadcast packets
> 3) Receive packets for another specified MAC address (semi-optional)
> 4) Receive packets in promiscuous mode (semi-optional)
> 5) Transmit packet to the MAC address provided
>
> Pretty much everything else can be done in kernelspace (though modern
> cards often provide offload of some IP and even TCP handling, interrupt
> coalescing, and all sorts of other stuff)
>
> (I learned far too much about minimalist Ethernet when the Clarkson Packet
> Drivers were getting created in the cubicle next to mine. :)
Thanks. I tried building with the driver embedded in the kernel, but the
compile failed with a halt. No crash is apparent, just a halt. It turned
out that this was repeated until I removed the netconsole command during
boot. System appears stable now. I will try tomorrow to embed the
driver, then add netconsole option in the command line.
Don
next prev parent reply other threads:[~2018-09-27 4:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-26 1:26 Problem with netconsole and eth0 timing don fisher
2018-09-26 2:26 ` valdis.kletnieks at vt.edu
2018-09-26 20:25 ` don fisher
2018-09-26 21:33 ` valdis.kletnieks at vt.edu
2018-09-27 4:38 ` don fisher [this message]
2018-09-27 7:01 ` valdis.kletnieks at vt.edu
2018-09-27 22:16 ` don fisher
2018-09-27 23:52 ` don fisher
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=f3432c4b-219f-b121-be3c-badff96821ac@comcast.net \
--to=hdf3@comcast.net \
--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 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).