network/netdev: remove support of netdevsim

netdevsim device creation by networkd was deprecated by
59a9ef1022 (v246), and it does not work
since kernel v5.2:
e05b2d141f

Now our baseline for the kernel is v5.4. Let's completely kill the
feature.
This commit is contained in:
Yu Watanabe
2025-04-12 07:10:51 +09:00
parent 012d76ab79
commit 67bdb6bee0
5 changed files with 0 additions and 36 deletions

View File

@@ -19,7 +19,6 @@ sources = files(
'netdev/macvlan.c',
'netdev/netdev-util.c',
'netdev/netdev.c',
'netdev/netdevsim.c',
'netdev/nlmon.c',
'netdev/tunnel.c',
'netdev/tuntap.c',

View File

@@ -27,7 +27,6 @@
#include "macsec.h"
#include "macvlan.h"
#include "netdev.h"
#include "netdevsim.h"
#include "netif-util.h"
#include "netlink-util.h"
#include "network-util.h"
@@ -79,7 +78,6 @@ const NetDevVTable * const netdev_vtable[_NETDEV_KIND_MAX] = {
[NETDEV_KIND_MACSEC] = &macsec_vtable,
[NETDEV_KIND_MACVLAN] = &macvlan_vtable,
[NETDEV_KIND_MACVTAP] = &macvtap_vtable,
[NETDEV_KIND_NETDEVSIM] = &netdevsim_vtable,
[NETDEV_KIND_NLMON] = &nlmon_vtable,
[NETDEV_KIND_SIT] = &sit_vtable,
[NETDEV_KIND_TAP] = &tap_vtable,
@@ -121,7 +119,6 @@ static const char* const netdev_kind_table[_NETDEV_KIND_MAX] = {
[NETDEV_KIND_MACSEC] = "macsec",
[NETDEV_KIND_MACVLAN] = "macvlan",
[NETDEV_KIND_MACVTAP] = "macvtap",
[NETDEV_KIND_NETDEVSIM] = "netdevsim",
[NETDEV_KIND_NLMON] = "nlmon",
[NETDEV_KIND_SIT] = "sit",
[NETDEV_KIND_TAP] = "tap",

View File

@@ -73,7 +73,6 @@ typedef enum NetDevKind {
NETDEV_KIND_MACSEC,
NETDEV_KIND_MACVLAN,
NETDEV_KIND_MACVTAP,
NETDEV_KIND_NETDEVSIM,
NETDEV_KIND_NLMON,
NETDEV_KIND_SIT,
NETDEV_KIND_TAP,

View File

@@ -1,18 +0,0 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/if_arp.h>
#include "netdevsim.h"
static bool netdevsim_can_set_mac(NetDev *netdev, const struct hw_addr_data *hw_addr) {
return true;
}
const NetDevVTable netdevsim_vtable = {
.object_size = sizeof(NetDevSim),
.sections = NETDEV_COMMON_SECTIONS,
.create_type = NETDEV_CREATE_INDEPENDENT,
.can_set_mac = netdevsim_can_set_mac,
.iftype = ARPHRD_ETHER,
.generate_mac = true,
};

View File

@@ -1,13 +0,0 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
typedef struct NetDevSim NetDevSim;
#include "netdev.h"
struct NetDevSim {
NetDev meta;
};
DEFINE_NETDEV_CAST(NETDEVSIM, NetDevSim);
extern const NetDevVTable netdevsim_vtable;