On 12/5/2023 2:54 AM, Chaoyong He wrote: > diff --git a/drivers/net/nfp/nfp_net_cmsg.h b/drivers/net/nfp/nfp_net_cmsg.h > new file mode 100644 > index 0000000000..15e0bb60d8 > --- /dev/null > +++ b/drivers/net/nfp/nfp_net_cmsg.h > @@ -0,0 +1,37 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright (c) 2023 Corigine, Inc. > + * All rights reserved. > + */ > + > +#ifndef __NFP_NET_CMSG_H__ > +#define __NFP_NET_CMSG_H__ > + > +#include "nfp_net_common.h" > + > +enum nfp_net_cfg_mbox_cmd { > + NFP_NET_CFG_MBOX_CMD_FS_ADD_V4, /* Add Flow Steer rule for V4 > table */ > + NFP_NET_CFG_MBOX_CMD_FS_DEL_V4, /* Delete Flow Steer rule for V4 > table */ > + NFP_NET_CFG_MBOX_CMD_FS_ADD_V6, /* Add Flow Steer rule for V4 > table */ > + NFP_NET_CFG_MBOX_CMD_FS_DEL_V6, /* Delete Flow Steer rule for V4 > table */ > + NFP_NET_CFG_MBOX_CMD_FS_ADD_ETHTYPE, /* Add Flow Steer rule for > Ethtype table */ > + NFP_NET_CFG_MBOX_CMD_FS_DEL_ETHTYPE, /* Delete Flow Steer rule for > Ethtype table */ > +}; > + > +enum nfp_net_cfg_mbox_ret { > + NFP_NET_CFG_MBOX_RET_FS_OK, /* No error happen */ > + NFP_NET_CFG_MBOX_RET_FS_ERR_NO_SPACE, /* Return error code no space > */ > + NFP_NET_CFG_MBOX_RET_FS_ERR_MASK_FULL, /* Return error code mask > table full */ > + NFP_NET_CFG_MBOX_RET_FS_ERR_CMD_INVALID, /* Return error code invalid > cmd */ > +}; > + > +/* 4B cmd, and up to 500B data. */ > +struct nfp_net_cmsg { > + uint32_t cmd; /**< One of nfp_net_cfg_mbox_cmd */ > + uint32_t data[0]; > +}; > Converted 'data' to flex array, 'uint32_t data[];' while merging,
since there is already an effort to switch all zero length array to C99 standard flex array: https://patchwork.dpdk.org/project/dpdk/list/?series=30410