> -----Original Message----- > From: Dai, Wei > Sent: Tuesday, June 27, 2017 10:07 PM > To: tho...@monjalon.net; Lu, Wenzhuo <wenzhuo...@intel.com>; Ananyev, > Konstantin <konstantin.anan...@intel.com>; Zhang, Helin > <helin.zh...@intel.com>; Wu, Jingjing <jingjing...@intel.com> > Cc: dev@dpdk.org; Dai, Wei <wei....@intel.com> > Subject: [PATCH v2 5/5] app/testpmd: add command to test NIC restoration > > When a NIC is reset, a message will show it. > And then user can run the command "reset_port port_id" > to reset the port and to keep same port id without any without any > configuration. > This patch adds a testpmd command "reconfig_port port_id" > to test whether the port can be reconfigured to have success Rx and Tx > function. > The new command will configure the port with the simplest setting which > includes only 1 Rx queue, only 1 Tx queue, Rx mode = None and Tx mode = > None. > It check if the port can receive and forward some packets. > For example 100 packets in this new command. > Before testing with "reset_port port_id" and then "reconfig_port port_id", > current forwarding should be stopped first to avoid crash. >
Testpmd has mechanism to support reconfigure, you can check the need_reconfig Field in port struct. No need to define a new command. Thanks Jingjing