0

When I type ifconfig eth1 I get this output:

eth1      Link encap:Ethernet  HWaddr 00:04:9F:05:3E:4A  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Memory:1aea000-1aeafff

What I'm interested in is the last line Memory:1aea000-1aeafff.
What file should I read to get this info? (I didn't find anything in /sys/class/net/eth1)

1 Answer 1

0

You have to query the driver instance:

Assuming e.g. you use the igb driver (Intel Gigabit) and the interface is on PCI 0000:05:00.0, then cat /sys/module/igb/drivers/pci\:igb/0000\:05\:00.0/resource will give you the PCI resource configuration, which will contain the memory mapping.

My machine here shows

$ ifconfig eno1
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ...
        device memory 0xdfb60000-dfb7ffff  

and cat /sys/module/igb/drivers/pci\:igb/0000\:05\:00.0/resource shows

0x00000000dfb60000 0x00000000dfb7ffff 0x0000000000040200
0x0000000000000000 ...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .