net/virtio: fix wrong Rx/Tx method for secondary process
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Fri, 6 Jan 2017 10:16:16 +0000 (18:16 +0800)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Tue, 17 Jan 2017 08:20:18 +0000 (09:20 +0100)
commitd4be35a91340b8474bd5f8b6bcaa26084bb30c9f
treeb250eefdf100174aa22f6df1e4b0c0707307e1c2
parentd948f596fee245823afb2b555a3164a53a6d91fd
net/virtio: fix wrong Rx/Tx method for secondary process

If the primary enables the vector Rx/Tx path, the current code would
let the secondary always choose the non vector Rx/Tx path. This results
to a Rx/Tx method mismatch between primary and secondary process. Werid
errors then may happen, something like:

    PMD: virtio_xmit_pkts() tx: virtqueue_enqueue error: -14

Fix it by choosing the correct Rx/Tx callbacks for the secondary process.
That is, use vector path if it's given.

Fixes: 8d8393fb1861 ("virtio: pick simple Rx/Tx")
Cc: stable@dpdk.org
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
drivers/net/virtio/virtio_ethdev.c