From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by dpdk.org (Postfix) with ESMTP id A2B936AB7 for ; Sat, 14 Jun 2014 03:08:45 +0200 (CEST) Received: by mail-pd0-f172.google.com with SMTP id fp1so2623901pdb.31 for ; Fri, 13 Jun 2014 18:09:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:user-agent:date:from:to:cc:subject :references:mime-version:content-type:content-disposition; bh=SFaFh44DOzzq4PYFUEP9P0JpfTOG9YsuZ1dbsOkXxiA=; b=nKPcx+AtvjFA0LatBV1fHPlmkb/uO9ncicTPbxIxV04JESXJLFXowNvKavBWHws4AD S4uxF/ZKYPXEErPxDm+O1UrSKKqXgAtDhZHZhnw7OFiyh09LvYtMbIlu+dP5i3oF11NT y63vg33hxOGX77G/L6D/mlf88KWWOkTLAl5837/KS50bw1T8oGlvhfbVBQ02pE9ojGex bh3RejnYiflKwA4rUE6/N34rRBfUeaXJ9cog9QjatCzcWMrQW88g/ZiUIwJODFiPX/nV SELAmYn2T9NW/Nd/autbIHTpMdxuLtb9jfwfSPCBSpbDhrw1vB3kl91WIBGTa/KbszI0 3b1g== X-Gm-Message-State: ALoCoQlWfeJvlD1NFaDm9Y0RL5iF8TSEUsPOXXGnPVxJYSYqT9/h8Vh7yIf87LnHzUSEsQ+tO0Ew X-Received: by 10.68.254.5 with SMTP id ae5mr7201453pbd.83.1402708140782; Fri, 13 Jun 2014 18:09:00 -0700 (PDT) Received: from localhost (static-50-53-83-51.bvtn.or.frontiernet.net. [50.53.83.51]) by mx.google.com with ESMTPSA id ib5sm5814487pbb.55.2014.06.13.18.08.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jun 2014 18:09:00 -0700 (PDT) Message-Id: <20140614010851.207429467@networkplumber.org> User-Agent: quilt/0.63-1 Date: Fri, 13 Jun 2014 18:06:21 -0700 From: Stephen Hemminger To: dev@dpdk.org References: <20140614010617.902738763@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=virtio-no-offloads.patch Subject: [dpdk-dev] [PATCH 4/8] virtio: check for transmit checksum config error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2014 01:08:46 -0000 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) {