From ca9964099fe67128bd380fb6026f1631ccd89f11 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 8 Sep 2019 19:54:21 +0200 Subject: ethernet: T1637: support changing flow-control --- src/conf_mode/interface-ethernet.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/conf_mode') diff --git a/src/conf_mode/interface-ethernet.py b/src/conf_mode/interface-ethernet.py index 83459cedb..a12980bfe 100755 --- a/src/conf_mode/interface-ethernet.py +++ b/src/conf_mode/interface-ethernet.py @@ -35,6 +35,7 @@ default_config_data = { 'dhcpv6_temporary': False, 'disable': False, 'disable_link_detect': 1, + 'flow_control': 'on', 'hw_id': '', 'ip_arp_cache_tmo': 30, 'ip_proxy_arp': 0, @@ -140,6 +141,10 @@ def get_config(): if conf.exists('disable-link-detect'): eth['disable_link_detect'] = 2 + # disable ethernet flow control (pause frames) + if conf.exists('disable-flow-control'): + eth['flow_control'] = 'off' + # retrieve real hardware address if conf.exists('hw-id'): eth['hw_id'] = conf.return_value('hw-id') @@ -232,6 +237,8 @@ def apply(eth): # ignore link state changes e.link_detect = eth['disable_link_detect'] + # disable ethernet flow control (pause frames) + e.set_flow_control(eth['flow_control']) # configure ARP cache timeout in milliseconds e.arp_cache_tmp = eth['ip_arp_cache_tmo'] # Enable proxy-arp on this interface -- cgit v1.2.3