From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH 4/8] virtio: check for transmit checksum config error Date: Fri, 13 Jun 2014 18:06:21 -0700 Message-ID: <20140614010851.207429467@networkplumber.org> References: <20140614010617.902738763@networkplumber.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 To: dev-VfR2kkLFssw@public.gmane.org Return-path: Content-Disposition: inline; filename=virtio-no-offloads.patch List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" This driver does not support transmit checksum or vlan offload therefore check for this when device is configured. Signed-off-by: Stephen Hemminger --- lib/librte_ether/rte_ethdev.h | 8 +++++--- lib/librte_pmd_virtio/virtio_rxtx.c | 9 ++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) --- a/lib/librte_pmd_virtio/virtio_rxtx.c 2014-06-13 17:55:01.788243375 -0700 +++ b/lib/librte_pmd_virtio/virtio_rxtx.c 2014-06-13 17:59:19.372748301 -0700 @@ -390,13 +390,20 @@ virtio_dev_tx_queue_setup(struct rte_eth 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) {