On Tue, 10 Dec 2024 13:53:22 +0800 Junlong Wang <wang.junlo...@zte.com.cn> wrote:
> elete port tables in host. > > Signed-off-by: Junlong Wang <wang.junlo...@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; }