[PATCH v4 04/15] net/xsc: add xsc dev ops to support VFIO driver

Stephen Hemminger stephen at networkplumber.org
Fri Jan 3 20:04:46 CET 2025


On Fri, 03 Jan 2025 23:04:13 +0800
"WanRenyong" <wanry at yunsilicon.com> wrote:

> +static int
> +xsc_vfio_set_mtu(struct xsc_dev *xdev, uint16_t mtu)
> +{
> +	struct xsc_cmd_set_mtu_mbox_in in;
> +	struct xsc_cmd_set_mtu_mbox_out out;
> +	int ret;
> +
> +	memset(&in, 0, sizeof(in));
> +	memset(&out, 0, sizeof(out));

Optionally, you can initalize on stack variables with:
	struct xsc_cmd_set_mtu_mbox_in in = { };

Either way is ok, it is up to you.


More information about the dev mailing list