numam-dpdk/drivers/net
Aaron Conole f7a58af502 net/enic: fix crash when freeing 0 packet to mempool
Occasionally, the amount of packets to free from the work queue ends
perfectly on a boundary to have nb_free = 0 and pool = 0.  This causes
a segfault as follows:

  (gdb) bt
  #0  rte_mempool_default_cache
  #1  rte_mempool_put_bulk (n=0, obj_table=0x7f10deff2530, mp=0x0)
  #2  enic_free_wq_bufs (wq=wq@entry=0x7efabffcd5b0,
      completed_index=completed_index@entry=33)
  #3  0x00007f11e9c86e17 in enic_cleanup_wq (enic=<optimized out>,
      wq=wq@entry=0x7efabffcd5b0)
      at /usr/src/debug/openvswitch-2.6.1/dpdk-16.11/drivers/net/enic/enic_rxtx.c:442
  #4  0x00007f11e9c86e5f in enic_xmit_pkts (tx_queue=0x7efabffcd5b0,
      tx_pkts=0x7f10deffb1a8, nb_pkts=<optimized out>)
      at /usr/src/debug/openvswitch-2.6.1/dpdk-16.11/drivers/net/enic/enic_rxtx.c:470
  #5  0x00007f11e9e147ad in rte_eth_tx_burst (nb_pkts=<optimized out>,
      tx_pkts=0x7f10deffb1a8, queue_id=0, port_id=<optimized out>)

This commit makes the enic wq driver match other drivers who call the
bulk free, by checking that there are actual packets to free.

Fixes: 36935afbc5 ("net/enic: refactor Tx mbuf recycling")
CC: stable@dpdk.org

Reported-by: Vincent S. Cojot <vcojot@redhat.com>
Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1468631
Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: John Daley <johndale@cisco.com>
2017-08-03 22:55:32 +02:00
..
af_packet drivers/net: use device name from device structure 2017-07-06 00:17:02 +02:00
ark net/ark: fix stats reset 2017-07-06 15:00:57 +02:00
avp net/avp: remove redundant assignment 2017-06-12 10:41:26 +01:00
bnx2x fix typos using codespell utility 2017-06-14 23:54:13 +02:00
bnxt net/bnxt: fix arguments to callback process 2017-07-31 19:58:41 +02:00
bonding net/bonding: fix link status interrupt when down 2017-07-31 19:58:41 +02:00
cxgbe drivers/net: remove duplicate includes 2017-07-16 17:30:24 +02:00
dpaa2 net/dpaa2: enable Tx congestion state check 2017-07-30 20:24:55 +02:00
e1000 net/igb: fix access bound in ethertype filter 2017-07-31 19:58:41 +02:00
ena net/ena/base: initialize memory in the allocation macros 2017-07-06 15:00:57 +02:00
enic net/enic: fix crash when freeing 0 packet to mempool 2017-08-03 22:55:32 +02:00
failsafe net/failsafe: fix blank line parsing 2017-08-03 22:36:01 +02:00
fm10k net/fm10k: initialize link status in device start 2017-07-06 15:00:56 +02:00
i40e net/i40e: fix Rx data segment buffer length 2017-08-03 22:45:52 +02:00
ixgbe net/ixgbe: support 2.5G and 5G on X550 2017-07-31 20:13:13 +02:00
kni drivers/net: use device name from device structure 2017-07-06 00:17:02 +02:00
liquidio net/liquidio: do not touch mbuf initialized fields 2017-06-12 10:41:29 +01:00
mlx4 net/mlx4: fix probe failure report 2017-07-31 19:58:41 +02:00
mlx5 net/mlx5: fix L4 packet type support 2017-07-31 19:58:41 +02:00
nfp eal: introduce integer log2 function 2017-07-03 10:44:12 +02:00
null bus/vdev: remove probe with driver name option 2017-07-10 00:46:38 +02:00
pcap drivers/net: use ethdev allocation helper for vdev 2017-04-18 19:04:49 +02:00
qede net/qede: update PMD version 2.5.2.1 2017-07-31 19:58:41 +02:00
ring net/ring: add missing newlines in logs 2017-07-19 11:09:13 +03:00
sfc net/sfc: support xstats retrieval by ID 2017-07-19 11:09:13 +03:00
szedata2 net/szedata2: use macro from common library 2017-07-06 15:00:56 +02:00
tap net/tap: remove Linux version check 2017-07-19 11:09:13 +03:00
thunderx net/thunderx: update sq config register field 2017-07-19 11:09:13 +03:00
vhost ethdev: add return values to callback process API 2017-07-01 17:19:55 +02:00
virtio net/virtio: fix Rx interrupt setup 2017-07-31 19:16:23 +02:00
vmxnet3 net/vmxnet3: fix filtering on promiscuous disabling 2017-08-03 22:23:49 +02:00
xenvirt ethdev: remove driver name from device private data 2017-06-12 16:27:44 +01:00
Makefile net/failsafe: add fail-safe PMD 2017-07-19 16:25:42 +03:00