[dpdk-dev] [PATCH 7/7] net/i40e: add support of restoration
Wu, Jingjing
jingjing.wu at intel.com
Wed Jun 7 09:50:27 CEST 2017
> -----Original Message-----
> From: Dai, Wei
> Sent: Saturday, May 27, 2017 4:22 PM
> To: Lu, Wenzhuo <wenzhuo.lu at intel.com>; Ananyev, Konstantin
> <konstantin.ananyev at intel.com>; Zhang, Helin <helin.zhang at intel.com>; Wu, Jingjing
> <jingjing.wu at intel.com>
> Cc: dev at dpdk.org; Dai, Wei <wei.dai at intel.com>
> Subject: [PATCH 7/7] net/i40e: add support of restoration
>
> export dev_uninit and dev_init for restoration to
> reset port but keep same port id.
>
> Signed-off-by: Wei Dai <wei.dai at intel.com>
> ---
> drivers/net/i40e/i40e_ethdev.c | 2 ++
> drivers/net/i40e/i40e_ethdev_vf.c | 5 +++++
> 2 files changed, 7 insertions(+)
>
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 4c49673..9512ca4 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -449,6 +449,8 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {
> .dev_start = i40e_dev_start,
> .dev_stop = i40e_dev_stop,
> .dev_close = i40e_dev_close,
> + .dev_init = eth_i40e_dev_init,
> + .dev_uninit = eth_i40e_dev_uninit,
> .promiscuous_enable = i40e_dev_promiscuous_enable,
> .promiscuous_disable = i40e_dev_promiscuous_disable,
> .allmulticast_enable = i40e_dev_allmulticast_enable,
you can just get int and unint func point by eth_dev->driver.eth_dev_init and eth_dev->driver.eth_dev_init
No need to define ops here.
More information about the dev
mailing list