Hi,
I follow the instructions for a split userspace/kernel implementation . I am running Ubuntu 4.9.20-rt16 with an Intel 82567LM Ethernet Controller.
I was succsssful in building the stack, kernel driver and demo_mn_console ( with the flag -DCFG_BUILD_KERNEL_STACK="Linux Kernel Module")
./plkload oplk82573mn.ko was executed successfully.
But I encountered a problem when I did:
./demo_mn_console.
demo_mn_console: Stack version:V2.6.2 Stack configuration:0x0000001B
Using CDC file: mnobd.cdc
Initializing openPOWERLINK stack...
oplkcreate() failed with "Resource could not be created (Windows, PxROS, ...)" (0x0008)
oplkfreeProcessImage() failed with "API called but stack is not initialized/running" (0x014e)
oplkexecNmtCommand() failed with "API called but stack is not initialized/running" (0x014e)
Stack is in state off ... Shutdown
Below is the dmesg output:
[ 3399.952170] e1000e: enp0s25 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None [ 3400.008023] iwlwifi 0000:03:00.0: Not sending command - RF KILL [ 3400.012418] IPv6: ADDRCONF(NETDEVCHANGE): enp0s25: link becomes ready [20222.888533] iwlwifi 0000:03:00.0: RFKILL bit toggled to enable radio. [20222.889608] iwlwifi 0000:03:00.0: RFKILL bit toggled to disable radio. [20222.948406] e1000e: enp0s25 NIC Link is Down [20223.123178] iwlwifi 0000:03:00.0: RFKILL bit toggled to enable radio. [20223.190528] PLK: powerlinkInit() Driver build: Mar 5 2018 / 10:35:17 [20223.190530] PLK: powerlinkInit() Stack version: V2.6.2 [20223.190531] Allocated major number: 242 [20223.222473] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled [20223.225762] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled [20223.225849] iwlwifi 0000:03:00.0: Radio type=0x0-0x2-0x0 [20223.373646] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled [20223.376674] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled [20223.376774] iwlwifi 0000:03:00.0: Radio type=0x0-0x2-0x0 [20223.409739] IPv6: ADDRCONF(NETDEVUP): wlp3s0: link is not ready [20223.477351] IPv6: ADDRCONF(NETDEVUP): wlp3s0: link is not ready [20259.047067] PLK: + powerlinkOpen()... [20259.047073] PLK: + powerlinkOpen() - OK [20259.047094] PLK: + powerlinkIoctl() (cmd=3 type=61)... [20259.047099] PLK: + powerlinkIoctl() (cmd=0 type=61)... [20259.047102] PLK: + powerlinkIoctl() (cmd=0 type=61)... [20259.047105] PLK: + powerlinkIoctl() (cmd=0 type=61)... [20259.047108] PLK: + powerlinkIoctl() (cmd=0 type=61)... [20259.056126] PLK: + powerlinkIoctl() (cmd=1 type=61)... [20259.056128] PLK: + powerlinkIoctl() (cmd=0 type=61)... [20259.056275] edrvinit pPciDev=NULL [20259.056277] edrvexit calling pciunregisterdriver() [20259.156621] PLK: + powerlinkIoctl() (cmd=0 type=61)... [20259.584090] edrvexit PCI driver for openPOWERLINK already unregistered [20259.584111] PLK: + powerlinkRelease()... [20259.584115] PLK: + powerlinkRelease() - OK
Any ideas what might be wrong?
Shouldn't I be seeing "InitOnePciDev" being called?
Thanks,
Simon
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for logging this bug. I have 2 questions:
(1) I presume the user/kernal space implementation has worked before, can you tell me what version of OPLK and Ubuntu combination was used? and what was the Ethernet Controller HW?
(2) "plkload"unbinds the existing kernel driver and loads the oplk82573mn.ko kernel module. But how and where does oplk82573mn.ko get binded to the Ethernet Controller?
Thanks,
Simon
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OPLK version - V2.6.0
Ubuntu Version - 16.04
Kernel version - 4.8.15-rt10
Ethernet controller H/W - 82573L
When the plkload command for loading the Ethernet kernel module is used, it creates a file in the /dev/proc/<module_name> location. If any application wants to make use of the Ethernet controller, then it will make a file open function to open the kernel module from the /dev/proc/<module_name> location and perform required operations.
The Kernel module will always contain the name of the Ethernet controller to which it needs to be binded and it will get binded by mapping to the address of the Ethernet controller that is available in the dtb(device tree) file.
Thanks,
Powerlink-Team-Kalycito
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I did "./plkload oplk82573mn.ko" with no errors. I also did "lsmod" to make sure oplk82573mn.ko is loaded.
But there is no /dev/proc directory although /dev and /proc exist independently. Where exactly should I be looking for this file? I tried finding anything named "oplk82573" will no success.
Thanks,
Simon
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This error occurs if the kernel module signature verification is enabled in your kernel. If this is enabled, then kernel will not allow the loading of modules that the vendor has not signed.
To solve this you have to disable this option in the kernel and rebuild the kernel.
Steps to disable:
cd /usr/src/<linux_header>
make menuconfig (it opens a pop-up screen)
Select Enable loadable module support
That will navigate to a screen and disable Module signature verification
Please find attached screenshot for disabling module signature.
Kindly try this out and let us know if you need any further help.
Hi,
I follow the instructions for a split userspace/kernel implementation . I am running Ubuntu 4.9.20-rt16 with an Intel 82567LM Ethernet Controller.
I was succsssful in building the stack, kernel driver and demo_mn_console ( with the flag -DCFG_BUILD_KERNEL_STACK="Linux Kernel Module")
./plkload oplk82573mn.ko was executed successfully.
But I encountered a problem when I did:
./demo_mn_console.
demo_mn_console: Stack version:V2.6.2 Stack configuration:0x0000001B
Using CDC file: mnobd.cdc
Initializing openPOWERLINK stack...
oplkcreate() failed with "Resource could not be created (Windows, PxROS, ...)" (0x0008)
oplkfreeProcessImage() failed with "API called but stack is not initialized/running" (0x014e)
oplkexecNmtCommand() failed with "API called but stack is not initialized/running" (0x014e)
Stack is in state off ... Shutdown
Below is the dmesg output:
[ 3399.952170] e1000e: enp0s25 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
[ 3400.008023] iwlwifi 0000:03:00.0: Not sending command - RF KILL
[ 3400.012418] IPv6: ADDRCONF(NETDEVCHANGE): enp0s25: link becomes ready
[20222.888533] iwlwifi 0000:03:00.0: RFKILL bit toggled to enable radio.
[20222.889608] iwlwifi 0000:03:00.0: RFKILL bit toggled to disable radio.
[20222.948406] e1000e: enp0s25 NIC Link is Down
[20223.123178] iwlwifi 0000:03:00.0: RFKILL bit toggled to enable radio.
[20223.190528] PLK: powerlinkInit() Driver build: Mar 5 2018 / 10:35:17
[20223.190530] PLK: powerlinkInit() Stack version: V2.6.2
[20223.190531] Allocated major number: 242
[20223.222473] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
[20223.225762] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
[20223.225849] iwlwifi 0000:03:00.0: Radio type=0x0-0x2-0x0
[20223.373646] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
[20223.376674] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
[20223.376774] iwlwifi 0000:03:00.0: Radio type=0x0-0x2-0x0
[20223.409739] IPv6: ADDRCONF(NETDEVUP): wlp3s0: link is not ready
[20223.477351] IPv6: ADDRCONF(NETDEVUP): wlp3s0: link is not ready
[20259.047067] PLK: + powerlinkOpen()...
[20259.047073] PLK: + powerlinkOpen() - OK
[20259.047094] PLK: + powerlinkIoctl() (cmd=3 type=61)...
[20259.047099] PLK: + powerlinkIoctl() (cmd=0 type=61)...
[20259.047102] PLK: + powerlinkIoctl() (cmd=0 type=61)...
[20259.047105] PLK: + powerlinkIoctl() (cmd=0 type=61)...
[20259.047108] PLK: + powerlinkIoctl() (cmd=0 type=61)...
[20259.056126] PLK: + powerlinkIoctl() (cmd=1 type=61)...
[20259.056128] PLK: + powerlinkIoctl() (cmd=0 type=61)...
[20259.056275] edrvinit pPciDev=NULL
[20259.056277] edrvexit calling pciunregisterdriver()
[20259.156621] PLK: + powerlinkIoctl() (cmd=0 type=61)...
[20259.584090] edrvexit PCI driver for openPOWERLINK already unregistered
[20259.584111] PLK: + powerlinkRelease()...
[20259.584115] PLK: + powerlinkRelease() - OK
Any ideas what might be wrong?
Shouldn't I be seeing "InitOnePciDev" being called?
Thanks,
Simon
Hi Simon,
You are right.
You should be seeing InitOnePcieDev called as below example dmesg output:
From your dmesg output, we see that the driver is not loaded.
Thanks,
Powerlink-Team-Kalycito
Hi,
Can you suggest what I should check or double-check?
Because when I do: sudo ./plkload oplk82573mn.ko
I got the following, so I presume the driver is load. Am I wrong?
Thanks,
Simon
Check if high resolution timer support is available... OK
1) 20:00.0 Ethernet controller: Intel Corporation 82567L Gigabit Network Connection
unbinding PCI device 0000:20:00.0
Loading POWERLINK module ...
POWERLINK module successfully loaded.
Hi,
An update, after I did:
I follow-up with "lsmod" and I can see that oplk82576 is loaded.
But how and where in the OPLK code does oplk83573.ko get binded to the Ethernet Controller?
When I do " lspci -v" after ./demo_mn_console, the "Kernel driver in use" field is empty?!
Simon
Hi Simon,
The behavior you observed looks like an issue. We have logged this bug in our Github list - https://github.com/OpenAutomationTechnologies/openPOWERLINK_V2/issues/339
You can track the status of the bug in Github.
Thanks,
Powerlink-Team-Kalycito
Hi,
Thank you for logging this bug. I have 2 questions:
(1) I presume the user/kernal space implementation has worked before, can you tell me what version of OPLK and Ubuntu combination was used? and what was the Ethernet Controller HW?
(2) "plkload"unbinds the existing kernel driver and loads the oplk82573mn.ko kernel module. But how and where does oplk82573mn.ko get binded to the Ethernet Controller?
Thanks,
Simon
Hi Simon,
The working configuration is:
When the plkload command for loading the Ethernet kernel module is used, it creates a file in the /dev/proc/<module_name> location. If any application wants to make use of the Ethernet controller, then it will make a file open function to open the kernel module from the /dev/proc/<module_name> location and perform required operations.
The Kernel module will always contain the name of the Ethernet controller to which it needs to be binded and it will get binded by mapping to the address of the Ethernet controller that is available in the dtb(device tree) file.
Thanks,
Powerlink-Team-Kalycito
Hi,
I did "./plkload oplk82573mn.ko" with no errors. I also did "lsmod" to make sure oplk82573mn.ko is loaded.
But there is no /dev/proc directory although /dev and /proc exist independently. Where exactly should I be looking for this file? I tried finding anything named "oplk82573" will no success.
Thanks,
Simon
Hi Simon,
Could you please check in "/sys/module/oplk82573mn" for the loaded ethernet driver?
Thanks,
Powerlink-Team-Kalycito
Hi,
With "./plkload oplk82573mn.ko", we could get:
"module verification failed: signature and/or required key missing -- tainted kernel".
It is not documented how to overcome this. Can you share with me what is the best way around this?
Thanks,
Simon
Hello Simon,
This error occurs if the kernel module signature verification is enabled in your kernel. If this is enabled, then kernel will not allow the loading of modules that the vendor has not signed.
To solve this you have to disable this option in the kernel and rebuild the kernel.
Steps to disable:
Please find attached screenshot for disabling module signature.
Kindly try this out and let us know if you need any further help.
Thanks,
Powerlink-Team-Kalycito