@@ -51,8 +51,6 @@ let ovs_ofctl = "/usr/bin/ovs-ofctl"
5151
5252let ovs_appctl = " /usr/bin/ovs-appctl"
5353
54- let ovs_vlan_bug_workaround = " /usr/sbin/ovs-vlan-bug-workaround"
55-
5654let brctl = ref " /sbin/brctl"
5755
5856let modprobe = " /sbin/modprobe"
@@ -274,25 +272,6 @@ module Sysfs = struct
274272 Result. Error
275273 (Fail_to_get_driver_name , " Failed to get driver name for: " ^ dev)
276274
277- (* * Returns the features bitmap for the driver for [dev]. The features bitmap
278- is a set of NETIF_F_ flags supported by its driver. *)
279- let get_features dev =
280- try Some (int_of_string (read_one_line (getpath dev " features" )))
281- with _ -> None
282-
283- (* * Returns [true] if [dev] supports VLAN acceleration, [false] otherwise. *)
284- let has_vlan_accel dev =
285- let flag_NETIF_F_HW_VLAN_TX = 128 in
286- let flag_NETIF_F_HW_VLAN_RX = 256 in
287- let flag_NETIF_F_VLAN =
288- flag_NETIF_F_HW_VLAN_TX lor flag_NETIF_F_HW_VLAN_RX
289- in
290- match get_features dev with
291- | None ->
292- false
293- | Some features ->
294- features land flag_NETIF_F_VLAN <> 0
295-
296275 let set_multicast_snooping bridge value =
297276 try
298277 let path = getpath bridge " bridge/multicast_snooping" in
@@ -1352,44 +1331,6 @@ module Ovs = struct
13521331 )
13531332 with _ -> warn " Failed to set max-idle=%d on OVS" t
13541333
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-
13931334 let get_vlans name =
13941335 try
13951336 let vlans_with_uuid =
@@ -1486,13 +1427,12 @@ module Ovs = struct
14861427 [" --" ; " --may-exist" ; " add-port" ; bridge; name] @ type_args
14871428
14881429 let create_bridge ?mac ?external_id ?disable_in_band ?igmp_snooping
1489- ~fail_mode vlan vlan_bug_workaround name =
1430+ ~fail_mode vlan name =
14901431 let vlan_arg =
14911432 match vlan with
14921433 | None ->
14931434 []
14941435 | Some (parent , tag ) ->
1495- handle_vlan_bug_workaround vlan_bug_workaround parent ;
14961436 [parent; string_of_int tag]
14971437 in
14981438 let mac_arg =
0 commit comments