diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-02-20 20:51:43 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-02-20 20:51:43 +0100 |
commit | 3c64c79d7977869da3ca4dc70eb97ff9c6682e52 (patch) | |
tree | cc5f11e60f26ac3bb14576a0a0b2ad9aa693c56c | |
parent | 73c5ef5b91ff0c03fafbcef9f195e479987cc170 (diff) | |
download | vyos-1x-3c64c79d7977869da3ca4dc70eb97ff9c6682e52.tar.gz vyos-1x-3c64c79d7977869da3ca4dc70eb97ff9c6682e52.zip |
ethernet: T3342: Xen vif driver requires sg offloading for MTU > 1500 bytes
-rwxr-xr-x | src/conf_mode/interfaces-ethernet.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/conf_mode/interfaces-ethernet.py b/src/conf_mode/interfaces-ethernet.py index e7f0cd6a5..bf4650773 100755 --- a/src/conf_mode/interfaces-ethernet.py +++ b/src/conf_mode/interfaces-ethernet.py @@ -76,10 +76,17 @@ def verify(ethernet): verify_mirror(ethernet) # verify offloading capabilities - if 'offload' in ethernet and 'rps' in ethernet['offload']: + if dict_search('offload.rps', ethernet) != None: if not os.path.exists(f'/sys/class/net/{ifname}/queues/rx-0/rps_cpus'): raise ConfigError('Interface does not suport RPS!') + driver = EthernetIf(ifname).get_driver_name() + # T3342 - Xen driver requires special treatment + if driver == "vif": + if int(ethernet['mtu']) > 1500 and dict_search('offload.sg', ethernet) == None: + raise ConfigError('Xen netback drivers requires scatter-gatter offloading '\ + 'for MTU size larger then 1500 bytes') + # XDP requires multiple TX queues if 'xdp' in ethernet: queues = glob(f'/sys/class/net/{ifname}/queues/tx-*') |