- 积分
- 44
贡献222
飞刀69 FD
注册时间2021-6-17
在线时间8 小时
扫一扫,手机访问本帖
|
使用的OK1028-linux-fs源码,Linux version 5.4.3-svn42 (root@ubuntu) (gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)) #1 SMP PREEMPT Wed Jun 16 16:17:37 +08 2021
我想使用brctl建立2个网桥,然后把2个端口以access口分别加入这2个网桥,当加入第二个的时候报错,所有的端口只能以access口加入到一个网桥里面,能请教下吗?命令如下
vconfig add swp0 100
ifconfig swp0 up
brctl addbr br100
brctl addif br100 swp0
ifconfig br100 up
vconfig add swp1 200
ifconfig swp1 up
brctl addbr br200
brctl addif br200 swp1
ifconfig br200 up
出错信息如下:
root@forlinx:~# ifconfig swp1 up
root@forlinx:~# brctl addbr br200
root@forlinx:~# brctl addif br200 swp1
--ifindex:5,dev:[ 56.114381] mscc_felix 0000:00:00.5 swp1: 1========br_add_if:
swp1
++ifindex:5,ENODEV:19,ifr.ifr_name:br200
[ 56.125580] mscc_felix 0000:00:00.5 swp1: 2========br_add_if:
[ 56.133000] mscc_felix 0000:00:00.5 swp1: 3========br_add_if:
[ 56.139786] mscc_felix 0000:00:00.5 swp1: 4========br_add_if:
[ 56.146351] mscc_felix 0000:00:00.5 swp1: 5========br_add_if:
[ 56.152944] mscc_felix 0000:00:00.5 swp1: 6========br_add_if:
[ 56.159491] mscc_felix 0000:00:00.5 swp1: 7========br_add_if:
[ 56.165983] mscc_felix 0000:00:00.5 swp1: 8========br_add_if:
[ 56.172437] 21====__netdev_upper_dev_link:1
[ 56.177990] 22====__netdev_upper_dev_link:0
[ 56.182434] 23====__netdev_upper_dev_link:0
[ 56.186828] 24====__netdev_upper_dev_link:-19
[ 56.191457] 27====__netdev_upper_dev_link:-19
[ 56.195858] mscc_felix 0000:00:00.5 swp1: 9========err:-19
[ 56.201467] mscc_felix 0000:00:00.5 swp1: 14========br_add_if:
--========br_soc[ 56.207858] mscc_felix 0000:00:00.5 swp1: 1========br_add_if:
ket_fd:3,err:-1,[ 56.215490] mscc_felix 0000:00:00.5 swp1: 2========br_add_if:
dev:swp1,errno:1[ 56.222696] mscc_felix 0000:00:00.5 swp1: 3========br_add_if:
9
[ 56.229943] mscc_felix 0000:00:00.5 swp1: 4========br_add_if:
[ 56.236201] mscc_felix 0000:00:00.5 swp1: 5========br_add_if:
[ 56.242492] mscc_felix 0000:00:00.5 swp1: 6========br_add_if:
[ 56.248723] mscc_felix 0000:00:00.5 swp1: 7========br_add_if:
[ 56.254935] mscc_felix 0000:00:00.5 swp1: 8========br_add_if:
[ 56.261152] 21====__netdev_upper_dev_link:1
[ 56.265439] 22====__netdev_upper_dev_link:0
[ 56.269755] 23====__netdev_upper_dev_link:0
[ 56.274117] 24====__netdev_upper_dev_link:-19
[ 56.278595] 27====__netdev_upper_dev_link:-19
[ 56.283074] mscc_felix 0000:00:00.5 swp1: 9========err:-19
[ 56.289185] mscc_felix 0000:00:00.5 swp1: 14========br_add_if:
--++++br_socket_fd:3,err:-1,dev:swp1,errno:19
bridge br200 does not exist,ifname index:5,ifname:swp1,err is:19,brname index:12
通过追踪发现OK1028-linux-kernel\net\bridge下面的br_if.c里面的函数br_add_if里面的 err = netdev_master_upper_dev_link(dev, br->dev, NULL, NULL, extack);这句调用出错,这个函数在net\core\dev.c里面的 调用 ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,&changeupper_info.info); 这个函数返回-19
能问下这是什么问题导致的吗 ?怎么修改 ?谢谢
|
|