Problem to bind back network interface
by Micik from LinuxQuestions.org on (#6QAZC)
Hello to all,
I have a specific question about unbind/bind network instance and hope someone will be able to help me.
I have a PC with Ubuntu linux 22.04 that has Intel Pro 1000 Dual port adapter card. By default kernel module e1000e is used for this NIC.
I need to use some specific Real Time application and I have compiled and build atemsys kernel module. In order to use this application, I need to unbind network interface instance, so atemsys module could use it for a specific network communication. All these steps are described in actual application's manual.
So the steps I need to take are:
1. use lspci command to find out pci address of the network instance
Code:lspci | grep EthernetThis will return something like:
Code:02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
02:05.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)2.Explicitely unbind the first instance like this:
Code:echo "0000:02:01.0" | sudo tee /sys/bus/pci/drivers/e1000/unbind3. I start the application like ./startAppxzy
4. When application is stopped, I try to bind back the network interface with the following command:
Code:echo "0000:02:01.0" | sudo tee /sys/bus/pci/drivers/e1000/bind and I'm getting an error message that device or resource is busy.
I'm sure that atemsys driver has released the pci card and I can confirm this examining dmesg log:
Code: 87.263676] atemsys: pci_find: found 0x8086:0x100f:0 -> 0000:02:01.0
[ 87.263685] atemsys: pci_select: 0000:02:01.0
[ 87.264133] atemsys: 0000:02:01.0: DefaultPciSettings: legacy INT configured
[ 142.591782] atemsys: pci_release: PCI device 0000:02:01.0 releasedThe complete dmesg log is attached.
I have tried many things like restarting NetworkManger, rmmod e1000e and then modprobe it back etc, but it only helps if the machine is rebooted.
There is one more interesting thing. I have virtualized this machine in vmware, and as expected it behaves the same, BUT if I change configuration from e1000e to e1000 in .vmx file, then e1000 kernel module is loaded and everything works fine. The bind back works without problems, so this is somehow connected to the actual module. No problems with e1000 abut it doesn't work with e1000e.
I'm not sure how to confirm this on a real PC hw machine, since e1000e driver is automatically chosen during installing ubuntu 22.04.
Do you have any idea how to solve this issue?
Thank you!
Attached Files
I have a specific question about unbind/bind network instance and hope someone will be able to help me.
I have a PC with Ubuntu linux 22.04 that has Intel Pro 1000 Dual port adapter card. By default kernel module e1000e is used for this NIC.
I need to use some specific Real Time application and I have compiled and build atemsys kernel module. In order to use this application, I need to unbind network interface instance, so atemsys module could use it for a specific network communication. All these steps are described in actual application's manual.
So the steps I need to take are:
1. use lspci command to find out pci address of the network instance
Code:lspci | grep EthernetThis will return something like:
Code:02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
02:05.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)2.Explicitely unbind the first instance like this:
Code:echo "0000:02:01.0" | sudo tee /sys/bus/pci/drivers/e1000/unbind3. I start the application like ./startAppxzy
4. When application is stopped, I try to bind back the network interface with the following command:
Code:echo "0000:02:01.0" | sudo tee /sys/bus/pci/drivers/e1000/bind and I'm getting an error message that device or resource is busy.
I'm sure that atemsys driver has released the pci card and I can confirm this examining dmesg log:
Code: 87.263676] atemsys: pci_find: found 0x8086:0x100f:0 -> 0000:02:01.0
[ 87.263685] atemsys: pci_select: 0000:02:01.0
[ 87.264133] atemsys: 0000:02:01.0: DefaultPciSettings: legacy INT configured
[ 142.591782] atemsys: pci_release: PCI device 0000:02:01.0 releasedThe complete dmesg log is attached.
I have tried many things like restarting NetworkManger, rmmod e1000e and then modprobe it back etc, but it only helps if the machine is rebooted.
There is one more interesting thing. I have virtualized this machine in vmware, and as expected it behaves the same, BUT if I change configuration from e1000e to e1000 in .vmx file, then e1000 kernel module is loaded and everything works fine. The bind back works without problems, so this is somehow connected to the actual module. No problems with e1000 abut it doesn't work with e1000e.
I'm not sure how to confirm this on a real PC hw machine, since e1000e driver is automatically chosen during installing ubuntu 22.04.
Do you have any idea how to solve this issue?
Thank you!
Attached Files
dmesg_extract.txt (1.0 KB) |