summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/ethernet.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-08-23 14:22:41 +0200
committerChristian Poessinger <christian@poessinger.com>2020-08-23 14:22:41 +0200
commitaa25690c83c4812c92490d29b564dd0330b24d34 (patch)
tree15c5f45b5f82fd5b788c842caeba06d3d81d96f9 /python/vyos/ifconfig/ethernet.py
parent20ef1aab793504cf4956dedeeadaf528933b7ccf (diff)
downloadvyos-1x-aa25690c83c4812c92490d29b564dd0330b24d34.tar.gz
vyos-1x-aa25690c83c4812c92490d29b564dd0330b24d34.zip
T2755: convert jmespath.search() to vyos_dict_search() for performance
Diffstat (limited to 'python/vyos/ifconfig/ethernet.py')
-rw-r--r--python/vyos/ifconfig/ethernet.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/python/vyos/ifconfig/ethernet.py b/python/vyos/ifconfig/ethernet.py
index b2f701e00..17c1bd64d 100644
--- a/python/vyos/ifconfig/ethernet.py
+++ b/python/vyos/ifconfig/ethernet.py
@@ -15,12 +15,12 @@
import os
import re
-import jmespath
from vyos.ifconfig.interface import Interface
from vyos.ifconfig.vlan import VLAN
from vyos.validate import assert_list
from vyos.util import run
+from vyos.util import vyos_dict_search
@Interface.register
@VLAN.enable
@@ -268,27 +268,27 @@ class EthernetIf(Interface):
self.set_flow_control(value)
# GRO (generic receive offload)
- tmp = jmespath.search('offload_options.generic_receive', config)
+ tmp = vyos_dict_search('offload_options.generic_receive', config)
value = tmp if (tmp != None) else 'off'
self.set_gro(value)
# GSO (generic segmentation offload)
- tmp = jmespath.search('offload_options.generic_segmentation', config)
+ tmp = vyos_dict_search('offload_options.generic_segmentation', config)
value = tmp if (tmp != None) else 'off'
self.set_gso(value)
# scatter-gather option
- tmp = jmespath.search('offload_options.scatter_gather', config)
+ tmp = vyos_dict_search('offload_options.scatter_gather', config)
value = tmp if (tmp != None) else 'off'
self.set_sg(value)
# TSO (TCP segmentation offloading)
- tmp = jmespath.search('offload_options.udp_fragmentation', config)
+ tmp = vyos_dict_search('offload_options.udp_fragmentation', config)
value = tmp if (tmp != None) else 'off'
self.set_tso(value)
# UDP fragmentation offloading
- tmp = jmespath.search('offload_options.udp_fragmentation', config)
+ tmp = vyos_dict_search('offload_options.udp_fragmentation', config)
value = tmp if (tmp != None) else 'off'
self.set_ufo(value)