SoftRoCE / rxe-dev

Development Repository for RXE
Other
128 stars 55 forks source link

Executing 'rxe_cfg start' gots 'echo: write error: Invalid argument' #55

Open theta1990 opened 7 years ago

theta1990 commented 7 years ago

Hi, I have installed rxe-v18 and librxe-dev on centos 6.5

[admin@localhost librxe-dev]$ uname -r
4.7.0-rc3+

When I try to load the ib_rxe kernel module or add Ethernet interface, I get the following errors:

[root@localhost ~]# rxe_cfg start
sh: line 0: echo: write error: Invalid argument
sh: line 0: echo: write error: Invaild argument
  Name   Link  Driver  Speed  NMTU  IPv4_addr    RDEV  RMTU
  p4p2   yes   r8169          1500  192.168.3.2
  wlan0  no    ath9k          1500

[root@localhost ~]# rxe_cfg add eth0
sh: line 0: echo: write error: Invalid argument

It seems that, the following codes in the rxe_cfg failed:

sub rxe_add {
    my $eth = $_[0];

    if (!($eth =~ /[\w]+[\d]/)) {
        print "eth_name ($eth) looks bogus\n";
        return;
    }

    if (!defined($rxe_names{$eth})) {   
        system("echo '$eth' > $parms/add"); ## this line failed
    }
    if (!$no_persist) {
        add_persistent($eth);
        commit_persistent();
    }
}

Is there any solution ?

Regards, Tao.

wentianxiaokai commented 7 years ago

The reason may be that the rxe network name is not the same as your eth0. First you should run ' nmcli con ' to see the Name of network. Second you should ' vi /var/rxe/rxe ' , delete the original content,then copy the network name from 'nmcli con',such as 'eno16777736', into /var/rxe/rxe.Then rxe_cfg stop and rxe_start is OK!