[dpdk-dev] [PATCH v6 1/4] ethdev: add support of NIC reset

Jerin Jacob jerin.jacob at caviumnetworks.com
Mon Jul 10 13:35:07 CEST 2017


-----Original Message-----
> Date: Mon, 10 Jul 2017 18:05:41 +0800
> From: Wei Dai <wei.dai at intel.com>
> To: thomas at monjalon.net, wenzhuo.lu at intel.com,
>  konstantin.ananyev at intel.com, jingjing.wu at intel.com, beilei.xing at intel.com
> CC: dev at dpdk.org, Wei Dai <wei.dai at intel.com>
> Subject: [dpdk-dev] [PATCH v6 1/4] ethdev: add support of NIC reset
> X-Mailer: git-send-email 2.7.5
> 
> This patch adds a new eth_dev layer API function rte_eth_dev_reset().
> A DPDK application can call this function to reset a NIC and keep
> its port id afterwards.
> It means that all SW resources allocated in ethdev layer should be
> kept and SW and HW resources of the NIC in PMD need to be reset in
> similar way that it runs PCI dev_uninit() and then dev_init().
> The sequence of dev_uninit() and dev_init() can be packed into a
> single interface API rte_eth_dev_reset().
> Please See the comments before the declaration of rte_eht_dev_reset()
> in lib/librte_ether/rte_ethdev.h to get more details on why this
> function is needed, what this function does and what an application
> should do after calling this function.
> 
> Signed-off-by: Wei Dai <wei.dai at intel.com>
> ---
>  /**
> + * Reset a Ethernet device and keep its port id.
> + *
> + * A DPDK application calls this function to do an initiative or passive
> + * reset of a port.
> + *
> + * Sometimes a port have to be reset passively. For example a PF is reset,
> + * all its VFs should also be reset by application itself to align with the
> + * PF.

May be I didn't understood this use case properly,But, PF can always send mailbox
message to VF on PF reset. Right?
On such message from PF, VF can transparently reset without application
knowledge(i.e rx and/or tx burst return zero)

> + * A DPDK application also can call this function to trigger an initative
> + * port reset.

When apart from the above use case? Even if it is above case, we should have
some event to notify application to initiate the reset.Right? Without the
event,  When or on what basics application needs to initiate reset?

> + *


More information about the dev mailing list