Skip to content

Commit 7af60c7

Browse files
committed
networkd: Remove usage of ovs-vlan-bug-workaround
networkd had code to call ovs-vlan-bug-workaround, but this has been made obsolete as the bug in question only applies to kernels before 2.6.37, which is long out of support. We can safely remove the functionality associated with applying the workaround. Signed-off-by: Christian Pardillo Laursen <[email protected]>
1 parent 39b166a commit 7af60c7

File tree

2 files changed

+2
-49
lines changed

2 files changed

+2
-49
lines changed

ocaml/networkd/bin/network_server.ml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -933,12 +933,6 @@ module Bridge = struct
933933
"standalone"
934934
)
935935
in
936-
let vlan_bug_workaround =
937-
if List.mem_assoc "vlan-bug-workaround" other_config then
938-
Some (List.assoc "vlan-bug-workaround" other_config = "true")
939-
else
940-
None
941-
in
942936
let external_id =
943937
if List.mem_assoc "network-uuids" other_config then
944938
Some
@@ -966,7 +960,7 @@ module Bridge = struct
966960
Option.iter (destroy_existing_vlan_ovs_bridge dbg name) vlan ;
967961
ignore
968962
(Ovs.create_bridge ?mac ~fail_mode ?external_id ?disable_in_band
969-
?igmp_snooping vlan vlan_bug_workaround name
963+
?igmp_snooping vlan name
970964
) ;
971965
if igmp_snooping = Some true && not old_igmp_snooping then
972966
Ovs.inject_igmp_query ~name

ocaml/networkd/lib/network_utils.ml

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ let ovs_ofctl = "/usr/bin/ovs-ofctl"
5151

5252
let ovs_appctl = "/usr/bin/ovs-appctl"
5353

54-
let ovs_vlan_bug_workaround = "/usr/sbin/ovs-vlan-bug-workaround"
55-
5654
let brctl = ref "/sbin/brctl"
5755

5856
let modprobe = "/sbin/modprobe"
@@ -1352,44 +1350,6 @@ module Ovs = struct
13521350
)
13531351
with _ -> warn "Failed to set max-idle=%d on OVS" t
13541352

1355-
let handle_vlan_bug_workaround override bridge =
1356-
(* This is a list of drivers that do support VLAN tx or rx acceleration,
1357-
but to which the VLAN bug workaround should not be applied. This could
1358-
be because these are known-good drivers (that is, they do not have any
1359-
of the bugs that the workaround avoids) or because the VLAN bug
1360-
workaround will not work for them and may cause other problems.
1361-
1362-
This is a very short list because few drivers have been tested. *)
1363-
let no_vlan_workaround_drivers = ["bonding"] in
1364-
let phy_interfaces =
1365-
try
1366-
let interfaces = bridge_to_interfaces bridge in
1367-
List.filter Sysfs.is_physical interfaces
1368-
with _ -> []
1369-
in
1370-
List.iter
1371-
(fun interface ->
1372-
let do_workaround =
1373-
match override with
1374-
| Some value ->
1375-
value
1376-
| None -> (
1377-
match Sysfs.get_driver_name interface with
1378-
| None ->
1379-
Sysfs.has_vlan_accel interface
1380-
| Some driver ->
1381-
if List.mem driver no_vlan_workaround_drivers then
1382-
false
1383-
else
1384-
Sysfs.has_vlan_accel interface
1385-
)
1386-
in
1387-
let setting = if do_workaround then "on" else "off" in
1388-
try ignore (call_script ovs_vlan_bug_workaround [interface; setting])
1389-
with _ -> ()
1390-
)
1391-
phy_interfaces
1392-
13931353
let get_vlans name =
13941354
try
13951355
let vlans_with_uuid =
@@ -1486,13 +1446,12 @@ module Ovs = struct
14861446
["--"; "--may-exist"; "add-port"; bridge; name] @ type_args
14871447

14881448
let create_bridge ?mac ?external_id ?disable_in_band ?igmp_snooping
1489-
~fail_mode vlan vlan_bug_workaround name =
1449+
~fail_mode vlan name =
14901450
let vlan_arg =
14911451
match vlan with
14921452
| None ->
14931453
[]
14941454
| Some (parent, tag) ->
1495-
handle_vlan_bug_workaround vlan_bug_workaround parent ;
14961455
[parent; string_of_int tag]
14971456
in
14981457
let mac_arg =

0 commit comments

Comments
 (0)