From: Stephen Hemminger Date: Sat, 14 Jun 2014 01:06:21 +0000 (-0700) Subject: virtio: check for transmit checksum config error X-Git-Tag: spdx-start~10503 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=61b16f0f167a331e65f0729b3554ded0440b545b;p=dpdk.git virtio: check for transmit checksum config error This driver does not support transmit checksum or vlan offload therefore check for this when device is configured. Signed-off-by: Stephen Hemminger Acked-by: Alan Carew --- diff --git a/lib/librte_pmd_virtio/virtio_rxtx.c b/lib/librte_pmd_virtio/virtio_rxtx.c index 4c45cdbb6f..2c68f40204 100644 --- a/lib/librte_pmd_virtio/virtio_rxtx.c +++ b/lib/librte_pmd_virtio/virtio_rxtx.c @@ -391,13 +391,20 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, uint16_t nb_desc, unsigned int socket_id, - __rte_unused const struct rte_eth_txconf *tx_conf) + const struct rte_eth_txconf *tx_conf) { uint8_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX; struct virtqueue *vq; int ret; PMD_INIT_FUNC_TRACE(); + + if ((tx_conf->txq_flags & ETH_TXQ_FLAGS_NOOFFLOADS) + != ETH_TXQ_FLAGS_NOOFFLOADS) { + PMD_INIT_LOG(ERR, "TX checksum offload not supported\n"); + return -EINVAL; + } + ret = virtio_dev_queue_setup(dev, VTNET_TQ, queue_idx, vtpci_queue_idx, nb_desc, socket_id, &vq); if (ret < 0) {