summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-09-12 20:50:03 +0200
committerChristian Poessinger <christian@poessinger.com>2022-09-12 20:50:03 +0200
commitd283048d3858e95b37df96f0a8acb5fc4223aa43 (patch)
tree4fbf9e23e4a7cf65ed52d55ecbac129c9a9235a4
parentb032ee2b9a5d314c0cd20e8ce073963b7261a0ac (diff)
downloadvyos-1x-d283048d3858e95b37df96f0a8acb5fc4223aa43.tar.gz
vyos-1x-d283048d3858e95b37df96f0a8acb5fc4223aa43.zip
Revert "rfs: T4689: Support RFS(Receive Flow Steering)"
This reverts commit 53355271a2864d844daca89a064c21e514e10adb.
-rw-r--r--interface-definitions/interfaces-ethernet.xml.in6
-rw-r--r--python/vyos/ifconfig/ethernet.py19
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_ethernet.py19
3 files changed, 0 insertions, 44 deletions
diff --git a/interface-definitions/interfaces-ethernet.xml.in b/interface-definitions/interfaces-ethernet.xml.in
index a85296209..c821f04b2 100644
--- a/interface-definitions/interfaces-ethernet.xml.in
+++ b/interface-definitions/interfaces-ethernet.xml.in
@@ -94,12 +94,6 @@
<valueless/>
</properties>
</leafNode>
- <leafNode name="rfs">
- <properties>
- <help>Enable Receive Flow Steering</help>
- <valueless/>
- </properties>
- </leafNode>
<leafNode name="sg">
<properties>
<help>Enable Scatter-Gather</help>
diff --git a/python/vyos/ifconfig/ethernet.py b/python/vyos/ifconfig/ethernet.py
index 55e7ffc1e..b8deb3311 100644
--- a/python/vyos/ifconfig/ethernet.py
+++ b/python/vyos/ifconfig/ethernet.py
@@ -16,7 +16,6 @@
import os
import re
-from glob import glob
from vyos.ethtool import Ethtool
from vyos.ifconfig.interface import Interface
from vyos.util import run
@@ -259,21 +258,6 @@ class EthernetIf(Interface):
# send bitmask representation as hex string without leading '0x'
return self.set_interface('rps', rps_cpus)
- def set_rfs(self, state):
- rfs_flow = 0
- global_rfs_flow = 0
- queues = glob(f'/sys/class/net/{ifname}/queues/rx-*')
- if state:
- global_rfs_flow = 32768
- rfs_flow = global_rfs_flow/queues
-
- call(f'echo {global_rfs_flow} > /proc/sys/net/core/rps_sock_flow_entries')
-
- for i in range(0,queues):
- call(f'echo {rfs_flow} > /sys/class/net/{ifname}/queues/rx-{i}/rps_flow_cnt')
-
- return True
-
def set_sg(self, state):
"""
Enable Scatter-Gather support. State can be either True or False.
@@ -358,9 +342,6 @@ class EthernetIf(Interface):
# RPS - Receive Packet Steering
self.set_rps(dict_search('offload.rps', config) != None)
- # RFS - Receive Flow Steering
- self.set_rfs(dict_search('offload.rfs', config) != None)
-
# scatter-gather option
self.set_sg(dict_search('offload.sg', config) != None)
diff --git a/smoketest/scripts/cli/test_interfaces_ethernet.py b/smoketest/scripts/cli/test_interfaces_ethernet.py
index fa6ba46a5..05d2ae5f5 100755
--- a/smoketest/scripts/cli/test_interfaces_ethernet.py
+++ b/smoketest/scripts/cli/test_interfaces_ethernet.py
@@ -18,7 +18,6 @@ import os
import re
import unittest
-from glob import glob
from netifaces import AF_INET
from netifaces import AF_INET6
from netifaces import ifaddresses
@@ -186,24 +185,6 @@ class EthernetInterfaceTest(BasicInterfaceTest.TestCase):
self.assertEqual(f'{cpus:x}', f'{rps_cpus:x}')
- def test_offloading_rfs(self):
- global_rfs_flow = 32768
- rfs_flow = global_rfs_flow
-
- for interface in self._interfaces:
- self.cli_set(self._base_path + [interface, 'offload', 'rfs'])
- self.cli_commit()
-
- for interface in self._interfaces:
- queues = glob(f'/sys/class/net/{interface}/queues/rx-*')
- rfs_flow = global_rfs_flow/queues
- for i in range(0,queues):
- flows = read_file(f'/sys/class/net/{interface}/queues/rx-{i}/rps_cpus')
- self.assertEqual(int(flows), rfs_flow)
-
- global_flows = read_file(f'/proc/sys/net/core/rps_sock_flow_entries')
- self.assertEqual(int(global_flows), global_rfs_flow)
-
def test_non_existing_interface(self):
unknonw_interface = self._base_path + ['eth667']
self.cli_set(unknonw_interface)