From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-outbound-2.vmware.com (smtp-outbound-2.vmware.com [208.91.2.13]) by dpdk.org (Postfix) with ESMTP id A89AC3979 for ; Tue, 29 Mar 2016 00:48:59 +0200 (CEST) Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id DE756281BC; Mon, 28 Mar 2016 15:48:56 -0700 (PDT) Received: from prmh-edge-ivybridge-01.eng.vmware.com (unknown [10.24.235.72]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id EB5BCB0161; Mon, 28 Mar 2016 15:48:57 -0700 (PDT) From: Yong Wang To: yongwang@vmware.com, thomas.monjalon@6wind.com Cc: dev@dpdk.org, qian.q.xu@intel.com, hengx.ding@intel.com Date: Mon, 28 Mar 2016 15:35:55 -0700 Message-Id: <1459204555-34070-1-git-send-email-yongwang@vmware.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH] vmxnet3: fix txq flags check 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: Mon, 28 Mar 2016 22:49:00 -0000 Now that vmxnet3 supports TCP/UDP checksum offload, let's update the default txq flags to allow such offloads. Also fixed the tx queue setup check to allow TCP/UDP checksum and only error out if SCTP checksum is requested. Fixes: f598fd063bb1 ("vmxnet3: add Tx L4 checksum offload") Reported-by: Heng Ding Signed-off-by: Yong Wang --- drivers/net/vmxnet3/vmxnet3_ethdev.c | 3 +-- drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index f2b6b92..b0588ef 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -709,8 +709,7 @@ vmxnet3_dev_info_get(__attribute__((unused))struct rte_eth_dev *dev, dev_info->max_rx_pktlen = 16384; /* includes CRC, cf MAXFRS register */ dev_info->max_mac_addrs = VMXNET3_MAX_MAC_ADDRS; - dev_info->default_txconf.txq_flags = ETH_TXQ_FLAGS_NOMULTSEGS | - ETH_TXQ_FLAGS_NOOFFLOADS; + dev_info->default_txconf.txq_flags = ETH_TXQ_FLAGS_NOXSUMSCTP; dev_info->flow_type_rss_offloads = VMXNET3_RSS_OFFLOAD_ALL; dev_info->rx_desc_lim = (struct rte_eth_desc_lim) { diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c index 66b0eed..ebf883f 100644 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c @@ -811,7 +811,7 @@ vmxnet3_dev_tx_queue_setup(struct rte_eth_dev *dev, PMD_INIT_FUNC_TRACE(); - if ((tx_conf->txq_flags & ETH_TXQ_FLAGS_NOXSUMS) != + if ((tx_conf->txq_flags & ETH_TXQ_FLAGS_NOXSUMSCTP) != ETH_TXQ_FLAGS_NOXSUMSCTP) { PMD_INIT_LOG(ERR, "SCTP checksum offload not supported"); return -EINVAL; -- 1.9.1