Re: [PATCH v10 13/14] net/sxe: add virtual function

Stephen Hemminger
2025-07-21T15:34:30Z

On Sat, 19 Jul 2025 17:05:36 +0800
Jie Liu <liujie5@linkdatatechnology.com> wrote:

> diff --git a/drivers/net/sxe/base/sxevf_hw.c b/drivers/net/sxe/base/sxevf_hw.c
> new file mode 100644
> index 0000000000..7425bafedb
> --- /dev/null
> +++ b/drivers/net/sxe/base/sxevf_hw.c
> @@ -0,0 +1,951 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright (C), 2022, Linkdata Technology Co., Ltd.
> + */
> +#if defined(__KERNEL__) || defined(SXE_KERNEL_TEST)
> +#include <linux/etherdevice.h>
> +

It is preferred that for base code you use a tool like unifdef
to remove any direct kernel parts. Seeing the stuff used by Linux
kernel driver can confuse readers and simple searches for code.
Plus AI tools really know nothing about code and what an ifdef is!