Skip to content

Commit 53d23bb

Browse files
committed
networkd: Remove has_vlan_accel from network_utils
Now that we have removed handle_vlan_bug_workaround, has_vlan_accel is no longer used anywhere, and it is no longer relevant. Therefore, we can safely remove it, and the function get_features that it calls. Signed-off-by: Christian Pardillo Laursen <christian.pardillolaursen@cloud.com>
1 parent 7af60c7 commit 53d23bb

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

ocaml/networkd/lib/network_utils.ml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -272,25 +272,6 @@ module Sysfs = struct
272272
Result.Error
273273
(Fail_to_get_driver_name, "Failed to get driver name for: " ^ dev)
274274

275-
(** Returns the features bitmap for the driver for [dev]. The features bitmap
276-
is a set of NETIF_F_ flags supported by its driver. *)
277-
let get_features dev =
278-
try Some (int_of_string (read_one_line (getpath dev "features")))
279-
with _ -> None
280-
281-
(** Returns [true] if [dev] supports VLAN acceleration, [false] otherwise. *)
282-
let has_vlan_accel dev =
283-
let flag_NETIF_F_HW_VLAN_TX = 128 in
284-
let flag_NETIF_F_HW_VLAN_RX = 256 in
285-
let flag_NETIF_F_VLAN =
286-
flag_NETIF_F_HW_VLAN_TX lor flag_NETIF_F_HW_VLAN_RX
287-
in
288-
match get_features dev with
289-
| None ->
290-
false
291-
| Some features ->
292-
features land flag_NETIF_F_VLAN <> 0
293-
294275
let set_multicast_snooping bridge value =
295276
try
296277
let path = getpath bridge "bridge/multicast_snooping" in

0 commit comments

Comments
 (0)