On Thu, 23 Jul 2015 16:51:32 +0800 Marco Lee <mac_leehk at yahoo.com.hk> wrote:
> The RX of VMXNET3 PMD will have deadlock when a lot of traffic coming in. > The root cause is due to mbuf allocation fail in vmxnet3_post_rx_bufs() and > there is no error handling when it is called > from vmxnet3_recv_pkts(). The RXD will not have "free" mbuf for it but the > counter still increment. > Finally, no packet can be received. > > This fix is allocate the mbuf first, if the allocation is failed, then reuse > the old mbuf > If the allocation is sucess, the vmxnet3_post_rx_bufs() will call > vmxnet3_renew_desc() > and RXD will be renew inside. > > Signed-off-by: Marco Lee <mac_leehk at yahoo.com.hk/marco.lee at > ruckuswireless.com> Much better. I ran this patch through checkpatch and the following things should be fixed. WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line) #69: The root cause is due to mbuf allocation fail in vmxnet3_post_rx_bufs() and there is no error handling when it is called WARNING: 'sucess' may be misspelled - perhaps 'success'? #74: If the allocation is sucess, the vmxnet3_post_rx_bufs() will call vmxnet3_renew_desc() WARNING: line over 80 characters #91: FILE: drivers/net/vmxnet3/vmxnet3_rxtx.c:425: +vmxnet3_renew_desc(vmxnet3_rx_queue_t *rxq, uint8_t ring_id,struct rte_mbuf *mbuf) ERROR: space required after that ',' (ctx:VxV) #91: FILE: drivers/net/vmxnet3/vmxnet3_rxtx.c:425: +vmxnet3_renew_desc(vmxnet3_rx_queue_t *rxq, uint8_t ring_id,struct rte_mbuf *mbuf) ^ WARNING: braces {} are not necessary for any arm of this statement #101: FILE: drivers/net/vmxnet3/vmxnet3_rxtx.c:435: + if (ring->rid == 0) { [...] + } else { [...] ERROR: space required after that ',' (ctx:VxV) #145: FILE: drivers/net/vmxnet3/vmxnet3_rxtx.c:694: + vmxnet3_renew_desc(rxq, ring_idx,rep); ^