From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by dpdk.org (Postfix) with ESMTP id 563B86AB7 for ; Sat, 14 Jun 2014 03:08:55 +0200 (CEST) Received: by mail-pa0-f50.google.com with SMTP id bj1so870990pad.9 for ; Fri, 13 Jun 2014 18:09:10 -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=lH1xen4Su/WkIBp/qQQA2jAXjp6gfRP8YDrG3BWveAE=; b=d+FLJW7gC50HAIjW3FyPEP8sLyyHf92IeVTmmNjnV0pIf21ebnWf814NnL/vekWgpI 5V/jGWBLZlK/8yaeM4llTzdR5nQnDEveBQA1YQYfHBCpoOcHxrjgX8gkY2X6fNubxMxs E5SU34DWgekHSoRy5sUqt1pSMmr3IflnZG/3pcQemhauiyXuMZjUspJbWO+1+uN58DnH b40WT1DD82dd3sbx/GBTwNAzeJg3JNd1NhbFsevgZGqeScdID9AWN8amWrPScLGFlpq3 eVnOjBmkXKbomjN4nmMw2t2f+8yYTTF3H7feamI0kGMMem45oZYYAIb+S6YAXnAWZKYi IkjQ== X-Gm-Message-State: ALoCoQlh4oLEmQWFKAayAVq4lvBNlM3fq2QmHJI5eAbtEZy14K/+3HkknhKOul87MStzlAh4emoc X-Received: by 10.66.122.135 with SMTP id ls7mr7462173pab.84.1402708150498; Fri, 13 Jun 2014 18:09:10 -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 xz7sm28982653pac.3.2014.06.13.18.09.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jun 2014 18:09:09 -0700 (PDT) Message-Id: <20140614010900.834967988@networkplumber.org> User-Agent: quilt/0.63-1 Date: Fri, 13 Jun 2014 18:06:22 -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-norxsum.patch Subject: [dpdk-dev] [PATCH 5/8] virtio: check for ip checksum offload 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:55 -0000 This driver does not support receive IP checksum offload, therefore must check and return error if configured incorrectly. Signed-off-by: Stephen Hemminger --- a/lib/librte_pmd_virtio/virtio_ethdev.c 2014-06-13 17:55:19.928278206 -0700 +++ b/lib/librte_pmd_virtio/virtio_ethdev.c 2014-06-13 17:56:08.080371208 -0700 @@ -901,8 +901,17 @@ virtio_dev_tx_queue_release(__rte_unused * It returns 0 on success. */ static int -virtio_dev_configure(__rte_unused struct rte_eth_dev *dev) +virtio_dev_configure(struct rte_eth_dev *dev) { + const struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode; + + PMD_INIT_LOG(DEBUG, "configure"); + + if (rxmode->hw_ip_checksum){ + PMD_DRV_LOG(ERR, "HW IP checksum not supported"); + return (-EINVAL); + } + return 0; }