net/qede: prevent crash while changing MTU dynamically
authorHarish Patil <harish.patil@qlogic.com>
Fri, 24 Mar 2017 07:40:59 +0000 (00:40 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 4 Apr 2017 17:02:57 +0000 (19:02 +0200)
commit1ef4c3a5c1f76b810620b76d82a31ce33a83d3fe
treea9dd336c9631e485abe2fdd357c9e47f72f58c05
parent8130abb3ec692be11b7456a3563b32f543a6955c
net/qede: prevent crash while changing MTU dynamically

The driver can handle dynamic MTU change without needing the port to be
stopped explicitly by the application. However, there is currently no
check to prevent I/Os from happening on a different thread while the
port is going thru' reset internally. This patch fixes this issue by
assigning RX/TX burst functions to a dummy function and also reconfigure
RX bufsize for each rx queue based on the new MTU value.

Fixes: 200645ac7909 ("net/qede: set MTU")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
drivers/net/qede/qede_ethdev.c
drivers/net/qede/qede_rxtx.c
drivers/net/qede/qede_rxtx.h