L2 switch not working after enabling IPTABLES

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

L2 switch not working after enabling IPTABLES

跳至解决方案
703 次查看
suchitasharma
Contributor I

We are using T1040 based board and linux 4.1.35. For testing L2 switch we used commands:

root@t1040d4rdb:-# l2sw_bin -i /tmp/il2sw -o /tmp/ol2sw&
[1] 2358
fifo /tmp/il2sw is used for stdin
stdout is redirected to /tmp/ol2sw
Using UIO: /dev/uio16
Mapped register memory @ 0x3fffa6889000
Chipid: 099530e9
root@t1040d4rdb:-# l2switch-cfg port all config show
l2switch>Port 0 state: enabled link: down mode: auto speed: ??? duplex: half
Port 1 state: enabled link: down mode: auto speed: ??? duplex: half
Port 2 state: enabled link: down mode: auto speed: ??? duplex: half
Port 3 state: enabled link: down mode: auto speed: ??? duplex: half
Port 4 state: enabled link: down mode: auto speed: ??? duplex: half
Port 5 state: enabled link: down mode: auto speed: ??? duplex: half
Port 6 state: enabled link: down mode: auto speed: ??? duplex: half
Port 7 state: enabled link: down mode: auto speed: ??? duplex: half
Port 8 state: enabled link: down mode: static speed: 2.5G duplex: full
Port 9 state: enabled link: down mode: static speed: 2.5G duplex: full

But after enabling Networking support/Networking options/Network packet filtering framework (Netfilter) option for using ip_tables and NAT modules, we are unable to test L2 switch.

Error what we are getting:

root@t1040d4rdb:~# l2sw_bin -i /tmp/il2sw -o /tmp/ol2sw&
[1] 2390
fifo /tmp/il2sw is used for stdin
stdout is redirected to /tmp/ol2sw
Unable to locate UIO device
: Success
root@t1040d4rdb:~# l2switch-cfg port all config show
l2sw_bin is not running

 

Please suggest what we can do for this issue.

0 项奖励
1 解答
695 次查看
yipingwang
NXP TechSupport
NXP TechSupport

You need to insert the module uio_seville.ko into the kernel.

In SDK 2.0 build environment, please run "bitbake uio-seville", you will get Kernel module in build_t1040d4rdb/tmp/work/t1040d4rdb-fsl-linux/uio-seville/0.1-r0/image/lib/modules/4.1.35-rt41/extra/uio_seville.ko, please copy uio_seville.ko to the target board and execute the following on the target board.

root@t1040d4rdb:~# insmod uio_seville.ko
seville ffe800000.l2switch: Found Seville Switch, UIO device - IRQ 26, id 0x099530e9.
seville MAC address not found
phy_0: shared IRQ 17
phy_1: shared IRQ 17
phy_2: shared IRQ 17
phy_3: shared IRQ 17
phy_4: shared IRQ 17
phy_5: shared IRQ 17
phy_6: shared IRQ 17
phy_7: shared IRQ 17
root@t1040d4rdb:~# l2sw_bin -i /tmp/il2sw -o /tmp/ol2sw&
[1] 1861
fifo /tmp/il2sw is used for stdin
stdout is redirected to /tmp/ol2sw
Using UIO: /dev/uio0
Mapped register memory @ 0xb7d19000
Chipid: 099530e9
root@t1040d4rdb:~# ls /dev/uio0
/dev/uio0

在原帖中查看解决方案

0 项奖励
1 回复
696 次查看
yipingwang
NXP TechSupport
NXP TechSupport

You need to insert the module uio_seville.ko into the kernel.

In SDK 2.0 build environment, please run "bitbake uio-seville", you will get Kernel module in build_t1040d4rdb/tmp/work/t1040d4rdb-fsl-linux/uio-seville/0.1-r0/image/lib/modules/4.1.35-rt41/extra/uio_seville.ko, please copy uio_seville.ko to the target board and execute the following on the target board.

root@t1040d4rdb:~# insmod uio_seville.ko
seville ffe800000.l2switch: Found Seville Switch, UIO device - IRQ 26, id 0x099530e9.
seville MAC address not found
phy_0: shared IRQ 17
phy_1: shared IRQ 17
phy_2: shared IRQ 17
phy_3: shared IRQ 17
phy_4: shared IRQ 17
phy_5: shared IRQ 17
phy_6: shared IRQ 17
phy_7: shared IRQ 17
root@t1040d4rdb:~# l2sw_bin -i /tmp/il2sw -o /tmp/ol2sw&
[1] 1861
fifo /tmp/il2sw is used for stdin
stdout is redirected to /tmp/ol2sw
Using UIO: /dev/uio0
Mapped register memory @ 0xb7d19000
Chipid: 099530e9
root@t1040d4rdb:~# ls /dev/uio0
/dev/uio0

0 项奖励