net/enic: revert mbuf fast free offload
authorHyong Youb Kim <hyonkim@cisco.com>
Thu, 26 Jul 2018 02:30:28 +0000 (19:30 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 2 Aug 2018 08:26:02 +0000 (10:26 +0200)
commitd16623dd393de3788abd619b80c20d2bbfffb4d4
tree773ac3da25452dcf4657d92b9c8d7bb615505901
parentefb9dd148e234aecd01966cd1d2aaa4b75836966
net/enic: revert mbuf fast free offload

This reverts the patch that enabled mbuf fast free.

There are two main reasons.

First, enic_fast_free_wq_bufs is broken. When
DEV_TX_OFFLOAD_MBUF_FAST_FREE is enabled, the driver calls this
function to free transmitted mbufs. This function currently does not
reset next and nb_segs. This is simply wrong as the fast-free flag
does not imply anything about next and nb_segs.

We could fix enic_fast_free_wq_bufs by making it to call
rte_pktmbuf_prefree_seg to reset the required fields. But, it negates
most of cycle saving.

Second, there are customer applications that blindly enable all Tx
offloads supported by the device. Some of these applications do not
satisfy the requirements of mbuf fast free (i.e. a single pool per
queue and refcnt = 1), and end up crashing or behaving badly.

Fixes: bcaa54c1a148 ("net/enic: support mbuf fast free offload")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
doc/guides/nics/features/enic.ini
doc/guides/rel_notes/release_18_08.rst
drivers/net/enic/enic_main.c
drivers/net/enic/enic_res.c
drivers/net/enic/enic_rxtx.c