Skip to content

Commit

Permalink
use runCmd func
Browse files Browse the repository at this point in the history
  • Loading branch information
karimra committed Sep 4, 2020
1 parent 4912602 commit ef8e1f5
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions clab/netlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,18 @@ func (c *cLab) CreateVirtualWiring(id int, link *Link) (err error) {
}

log.Debug("set RX, TX offload off on container A")
var b []byte
b, err = exec.Command("docker", "exec", link.a.Node.LongName, "ethtool", "--offload", link.a.EndpointName, "rx", "off", "tx", "off").CombinedOutput()
cmd = exec.Command("docker", "exec", link.a.Node.LongName, "ethtool", "--offload", link.a.EndpointName, "rx", "off", "tx", "off")
err = runCmd(cmd)
if err != nil {
log.Debugf("cmd.Run() failed with: %s", err)

log.Debugf("%s failed with: %v", cmd.String(), err)
}
log.Debugf("%s", string(b))

log.Debug("set RX, TX offload off on container B")
b, err = exec.Command("docker", "exec", link.b.Node.LongName, "ethtool", "--offload", link.b.EndpointName, "rx", "off", "tx", "off").CombinedOutput()
cmd = exec.Command("docker", "exec", link.b.Node.LongName, "ethtool", "--offload", link.b.EndpointName, "rx", "off", "tx", "off")
err = runCmd(cmd)
if err != nil {
log.Debugf("cmd.Run() failed with: %s", err)
log.Debugf("%s failed with: %v", cmd.String(), err)
}
log.Debugf("%s", string(b))

//ip link add tmp_a type veth peer name tmp_b
//ip link set tmp_a netns $srl_a
Expand Down

0 comments on commit ef8e1f5

Please sign in to comment.