net-next.git - net-next plumbings
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSathya Perla <sathya.perla@broadcom.com>2016-07-27 05:26:18 -0400
committerDavid S. Miller <davem@davemloft.net>2016-08-08 15:38:27 -0700
commitb71724147e7307d9d6f89b3f60b92375b304e181 (patch)
treede17129e973a659f0cf7b8ebab45fd64e51189ac
parent92fbb1df83ec17f62a46b23507ebb3f06ca10cd3 (diff)
be2net: replace polling with sleeping in the FW completion path
The ndo_set_rx_mode() and ndo_add/del_vxlan_port() calls may be called with BHs disabled. The driver currently issues the required cmds to the FW in these contexts and polls on completions from the FW, while BHs remain disabled. This can cause either packet loss or packet reception to be delayed on that CPU. This patch defers processing of the above cmds to a separate workqueue. With this change, FW cmds are now issued only in process context. Now that the FW cmds are issued only in process context, they can sleep waiting for a completion instead of polling. All the spin_lock_bh(mcc_lock) calls are now replaced with mutex calls. Also a new rx_filter_lock is now needed to protect the RX filtering fields like vids[] between be_vlan_add/rem_vid() and __be_set_rx_mode() contexts. Signed-off-by: Sathya Perla <sathya.perla@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>