From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-x236.google.com (mail-lb0-x236.google.com [IPv6:2a00:1450:4010:c04::236]) by dpdk.org (Postfix) with ESMTP id E725E58D2 for ; Mon, 27 Jan 2014 09:01:08 +0100 (CET) Received: by mail-lb0-f182.google.com with SMTP id w7so4121894lbi.41 for ; Mon, 27 Jan 2014 00:02:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=v4EABF+saJSfahhTp7kIsUR0cwOO2fRK62+spapS9Xs=; b=HE5DvF1/aoE/8B0XKeEGD8rvrNo1T02gV94nQ88N9FaoXJS/iZLeqcA5NDGIhgb27o V0gAsCDEJmuJ9KhLWvn4xuSMEqOQiE8ySeobBCYr6byvu6qwWF76+metqW0E11QiY+gU V063Bz+2rKhJf8fhBVNJnU2mfO4v2kMquJVbzklt0kGl1GCxzc6gLygrk8aWo+ydeirI U321DaUzdevGoVefFZPqZMsibUcKjQ2imau4wr8NwAQTA3iM29zRXTnZsjaeujfB2jNm nU7qx+9qlI8WEpBnqVItynjCWlxwmVi+fQsFgfpeqXYKy0dlSYTwA3iEwRYPZ1//jlJm 2rxA== MIME-Version: 1.0 X-Received: by 10.112.154.202 with SMTP id vq10mr1134623lbb.3.1390809744426; Mon, 27 Jan 2014 00:02:24 -0800 (PST) Received: by 10.114.1.232 with HTTP; Mon, 27 Jan 2014 00:02:24 -0800 (PST) In-Reply-To: <7B58AC42-4409-4448-A748-BADA7F37E32C@windriver.com> References: <4FE91E82-8097-451E-A36D-2F1254573A89@windriver.com> <7B58AC42-4409-4448-A748-BADA7F37E32C@windriver.com> Date: Mon, 27 Jan 2014 12:02:24 +0400 Message-ID: From: Vladimir Medvedkin To: "Wiles, Roger Keith" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "" Subject: Re: [dpdk-dev] pktgen offload checksum flag not able to make it work with pacp packets. 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, 27 Jan 2014 08:01:09 -0000 Hi Banashankar, For proper TCP checksum calculation you have to calculate checksum over pseudo header (see app/test-pmd/cmdline.c) and put result in tcp_hdr->cksum 2014-01-26 Wiles, Roger Keith > Hi Banashankar, > > The tx_conf is used in the pktgen_config_ports() with the > rte_eth_tx_queue_setup() and I am not sure why it matters that tx_conf is > disable. The values are mostly zero, but some type of interaction must be > going on. It may be the txq_flags being set to IXGBE_SIMPLE_FLAGS and it > is overriding the the per packet flag later. You will need to look at the > driver to determine the real reason. > > The checksum should not be wrong unless the hardware registers are not > setup correctly, but I would not think that is the case. You may want to > verify the checksum is correct another way, because I can not see the > hardware doing the checksum wrong. > > Thanks > ++Keith > > > Keith Wiles, Principal Technologist for Networking member of the CTO > office, Wind River > mobile 940.213.5533 > [Powering 30 Years of Innovation] > > > On Jan 25, 2014, at 4:53 PM, Banashankar KV banveerad@gmail.com>> wrote: > > Hi, > Thanks a lot for the reply ! > Yes I have checked those examples and had set all those flags. But IP > checksum started working after commenting off the txq_flags from > the pktgen.c file's tx_conf . > > And I added the following flag to calculate the tcp checksum. > > m->ol_flags |= PKT_TX_TCP_CKSUM > > its calculating the TCP checksum but turning out to be wrong checksum. > > Thanks > Banashankar > > > > On Fri, Jan 24, 2014 at 11:44 AM, Wiles, Roger Keith < > keith.wiles@windriver.com> wrote: > I have not enabled that feature myself, but I would expect it to work as > long as the hardware does. What does the docs say about enabling hardware > offload support? Did you look at the following files: > > ip_reassembly/ipv4_rsmbl.h: m->ol_flags |= PKT_TX_IP_CKSUM; > ipv4_frag/rte_ipv4_frag.h: out_pkt->ol_flags |= > PKT_TX_IP_CKSUM; > > Thanks > ++Keith > > Keith Wiles, Principal Technologist for Networking member of the CTO > office, Wind River > mobile 940.213.5533 > [Powering 30 Years of Innovation] > > > On Jan 24, 2014, at 12:54 PM, Banashankar KV banveerad@gmail.com>> wrote: > > I was modifying a packet in pktgen_pcap_mbuf_ctor() > and after modifying I wanted to offload the checksum calculation to h/w > so I am setting these flags in pktgen_pcap_mbuf_ctor function. > > m->pkt.vlan_macip.f.l2_len = sizeof(struct ether_hdr); > m->pkt.vlan_macip.f.l3_len = sizeof(struct ipv4_hdr); > > m->ol_flags = PKT_TX_IP_CKSUM > > > I even tried with setting .txq_flags = 0 in rte_eth_txconf struct in > pktgen.c. > > But still not able to get the h/w checksum. Am I missing anything ? > > > > Thanks > Banashankar > > > > Regards, Vladimir