[PATCH v2 04/15] net/zxdh: port tables unint implementations
Stephen Hemminger
stephen at networkplumber.org
Fri Dec 13 20:45:18 CET 2024
On Tue, 10 Dec 2024 13:53:22 +0800
Junlong Wang <wang.junlong1 at zte.com.cn> wrote:
> elete port tables in host.
>
> Signed-off-by: Junlong Wang <wang.junlong1 at zte.com.cn>
> ---
> drivers/net/zxdh/zxdh_ethdev.c | 19 ++++++
> drivers/net/zxdh/zxdh_msg.h | 1 +
> drivers/net/zxdh/zxdh_np.c | 113 +++++++++++++++++++++++++++++++++
> drivers/net/zxdh/zxdh_np.h | 9 +++
> drivers/net/zxdh/zxdh_tables.c | 36 ++++++++++-
> drivers/net/zxdh/zxdh_tables.h | 1 +
> 6 files changed, 177 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/zxdh/zxdh_ethdev.c b/drivers/net/zxdh/zxdh_ethdev.c
> index 8a9ca87183..a72319758a 100644
> --- a/drivers/net/zxdh/zxdh_ethdev.c
> +++ b/drivers/net/zxdh/zxdh_ethdev.c
> @@ -887,12 +887,31 @@ zxdh_np_uninit(struct rte_eth_dev *dev)
> zxdh_np_dtb_data_res_free(hw);
> }
>
> +static int
> +zxdh_tables_uninit(struct rte_eth_dev *dev)
> +{
> + int ret = 0;
> +
> + ret = zxdh_port_attr_uninit(dev);
> + if (ret) {
> + PMD_DRV_LOG(ERR, "zxdh_port_attr_uninit failed");
> + return ret;
> + }
> + return ret;
> +}
> +
Could be simplified to:
static int
zxdh_tables_uninit(struct rte_eth_dev *dev)
{
int ret;
ret = zxdh_port_attr_uninit(dev);
if (ret)
PMD_DRV_LOG(ERR, "zxdh_port_attr_uninit failed");
return ret;
}
More information about the dev
mailing list