This is sometimes and the flags cannot be changed after the device is created. for example we need to allow zero ipv6 checksum when working with OVS vxlan interface against native vxlan interface. We need to set udp6zerocsumrx udp6zerocsumtx.
Signed-off-by: Roi Dayan roid@mellanox.com --- lnst/Slave/NetConfigDevice.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py index cadce06..a94fd71 100644 --- a/lnst/Slave/NetConfigDevice.py +++ b/lnst/Slave/NetConfigDevice.py @@ -333,6 +333,7 @@ class NetConfigDeviceVxlan(NetConfigDeviceGeneric): vxlan_id = int(get_option(config, "id")) group_ip = get_option(config, "group_ip") remote_ip = get_option(config, "remote_ip") + extra = get_option(config, "extra") or ''
if group_ip: group_or_remote = "group %s" % group_ip @@ -347,12 +348,13 @@ class NetConfigDeviceVxlan(NetConfigDeviceGeneric): else: dstport = int(dstport)
- exec_cmd("ip link add %s type vxlan id %d %s %s dstport %d" + exec_cmd("ip link add %s type vxlan id %d %s %s dstport %d %s" % (dev_name, vxlan_id, dev_param, group_or_remote, - dstport)) + dstport, + extra))
def destroy(self): dev_name = self._dev_config["name"]
Wed, Sep 27, 2017 at 10:23:45AM CEST, roid@mellanox.com wrote:
This is sometimes and the flags cannot be changed after the device is created. for example we need to allow zero ipv6 checksum when working with OVS vxlan interface against native vxlan interface. We need to set udp6zerocsumrx udp6zerocsumtx.
Signed-off-by: Roi Dayan roid@mellanox.com
lnst/Slave/NetConfigDevice.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py index cadce06..a94fd71 100644 --- a/lnst/Slave/NetConfigDevice.py +++ b/lnst/Slave/NetConfigDevice.py @@ -333,6 +333,7 @@ class NetConfigDeviceVxlan(NetConfigDeviceGeneric): vxlan_id = int(get_option(config, "id")) group_ip = get_option(config, "group_ip") remote_ip = get_option(config, "remote_ip")
extra = get_option(config, "extra") or '' if group_ip: group_or_remote = "group %s" % group_ip
@@ -347,12 +348,13 @@ class NetConfigDeviceVxlan(NetConfigDeviceGeneric): else: dstport = int(dstport)
exec_cmd("ip link add %s type vxlan id %d %s %s dstport %d"
exec_cmd("ip link add %s type vxlan id %d %s %s dstport %d %s" % (dev_name, vxlan_id, dev_param, group_or_remote,
dstport))
dstport,
extra))
I think that if you don't define the 'extra' value, get_option() returns None. In that case you'd end up with command: 'ip link add ... None' that would return an error.
Could you please check this and fix if it fails?
Regards, Jan
def destroy(self): dev_name = self._dev_config["name"]
-- 2.7.0 _______________________________________________ LNST-developers mailing list -- lnst-developers@lists.fedorahosted.org To unsubscribe send an email to lnst-developers-leave@lists.fedorahosted.org
On 27/09/2017 12:25, Jan Tluka wrote:
Wed, Sep 27, 2017 at 10:23:45AM CEST, roid@mellanox.com wrote:
This is sometimes and the flags cannot be changed after the device is created. for example we need to allow zero ipv6 checksum when working with OVS vxlan interface against native vxlan interface. We need to set udp6zerocsumrx udp6zerocsumtx.
Signed-off-by: Roi Dayan roid@mellanox.com
lnst/Slave/NetConfigDevice.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py index cadce06..a94fd71 100644 --- a/lnst/Slave/NetConfigDevice.py +++ b/lnst/Slave/NetConfigDevice.py @@ -333,6 +333,7 @@ class NetConfigDeviceVxlan(NetConfigDeviceGeneric): vxlan_id = int(get_option(config, "id")) group_ip = get_option(config, "group_ip") remote_ip = get_option(config, "remote_ip")
extra = get_option(config, "extra") or '' if group_ip: group_or_remote = "group %s" % group_ip
@@ -347,12 +348,13 @@ class NetConfigDeviceVxlan(NetConfigDeviceGeneric): else: dstport = int(dstport)
exec_cmd("ip link add %s type vxlan id %d %s %s dstport %d"
exec_cmd("ip link add %s type vxlan id %d %s %s dstport %d %s" % (dev_name, vxlan_id, dev_param, group_or_remote,
dstport))
dstport,
extra))
I think that if you don't define the 'extra' value, get_option() returns None. In that case you'd end up with command: 'ip link add ... None' that would return an error.
Could you please check this and fix if it fails?
Regards, Jan
I checked this. notice I added a condition to assign an empty string when get_option returns None. so formatting the ip command wont fail.
def destroy(self): dev_name = self._dev_config["name"]
-- 2.7.0 _______________________________________________ LNST-developers mailing list -- lnst-developers@lists.fedorahosted.org To unsubscribe send an email to lnst-developers-leave@lists.fedorahosted.org
Thu, Sep 28, 2017 at 10:53:41AM CEST, roid@mellanox.com wrote:
On 27/09/2017 12:25, Jan Tluka wrote:
Wed, Sep 27, 2017 at 10:23:45AM CEST, roid@mellanox.com wrote:
This is sometimes and the flags cannot be changed after the device is created. for example we need to allow zero ipv6 checksum when working with OVS vxlan interface against native vxlan interface. We need to set udp6zerocsumrx udp6zerocsumtx.
Signed-off-by: Roi Dayan roid@mellanox.com
lnst/Slave/NetConfigDevice.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py index cadce06..a94fd71 100644 --- a/lnst/Slave/NetConfigDevice.py +++ b/lnst/Slave/NetConfigDevice.py @@ -333,6 +333,7 @@ class NetConfigDeviceVxlan(NetConfigDeviceGeneric): vxlan_id = int(get_option(config, "id")) group_ip = get_option(config, "group_ip") remote_ip = get_option(config, "remote_ip")
extra = get_option(config, "extra") or '' if group_ip: group_or_remote = "group %s" % group_ip
@@ -347,12 +348,13 @@ class NetConfigDeviceVxlan(NetConfigDeviceGeneric): else: dstport = int(dstport)
exec_cmd("ip link add %s type vxlan id %d %s %s dstport %d"
exec_cmd("ip link add %s type vxlan id %d %s %s dstport %d %s" % (dev_name, vxlan_id, dev_param, group_or_remote,
dstport))
dstport,
extra))
I think that if you don't define the 'extra' value, get_option() returns None. In that case you'd end up with command: 'ip link add ... None' that would return an error.
Could you please check this and fix if it fails?
Regards, Jan
I checked this. notice I added a condition to assign an empty string when get_option returns None. so formatting the ip command wont fail.
Oh, blind me. You're right. I just missed that "or ''" after get_option(). Makes sense then.
-Jan
def destroy(self): dev_name = self._dev_config["name"]
-- 2.7.0 _______________________________________________ LNST-developers mailing list -- lnst-developers@lists.fedorahosted.org To unsubscribe send an email to lnst-developers-leave@lists.fedorahosted.org
On Wed, Sep 27, 2017 at 11:23:45AM +0300, Roi Dayan wrote:
This is sometimes and the flags cannot be changed after the device is created. for example we need to allow zero ipv6 checksum when working with OVS vxlan interface against native vxlan interface. We need to set udp6zerocsumrx udp6zerocsumtx.
Signed-off-by: Roi Dayan roid@mellanox.com
lnst/Slave/NetConfigDevice.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py index cadce06..a94fd71 100644 --- a/lnst/Slave/NetConfigDevice.py +++ b/lnst/Slave/NetConfigDevice.py @@ -333,6 +333,7 @@ class NetConfigDeviceVxlan(NetConfigDeviceGeneric): vxlan_id = int(get_option(config, "id")) group_ip = get_option(config, "group_ip") remote_ip = get_option(config, "remote_ip")
extra = get_option(config, "extra") or '' if group_ip: group_or_remote = "group %s" % group_ip
@@ -347,12 +348,13 @@ class NetConfigDeviceVxlan(NetConfigDeviceGeneric): else: dstport = int(dstport)
exec_cmd("ip link add %s type vxlan id %d %s %s dstport %d"
exec_cmd("ip link add %s type vxlan id %d %s %s dstport %d %s" % (dev_name, vxlan_id, dev_param, group_or_remote,
dstport))
dstport,
extra))
def destroy(self): dev_name = self._dev_config["name"]
-- 2.7.0 _______________________________________________ LNST-developers mailing list -- lnst-developers@lists.fedorahosted.org To unsubscribe send an email to lnst-developers-leave@lists.fedorahosted.org
pushed, thanks -Ondrej
lnst-developers@lists.fedorahosted.org