From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 0CD241F5 for ; Wed, 28 Jan 2015 14:03:20 +0100 (CET) Received: by mail-wg0-f41.google.com with SMTP id a1so20472079wgh.0 for ; Wed, 28 Jan 2015 05:03:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=WXNjtS0OQQTK78vuqNlC4EF7MkjJh/wbwp5CtYhPcig=; b=GQctOP7ZKn+7Dh5kcQyNLIoZnKuvMkQnSPwbyvKqi4evU/QvA4Z3CkWTsE2b5TogJk wv7jaY4vsVUVbwPFuIjyDNv3ohw97J9nBRkDROWyzClaN0dyhSBNSc90VxQV8tsAQ1gH N04dHCTSl8q6hSN2g+aa0XgCkpbq9dDMQN4TVBwfen18SRLQx5aTeCgudqIM/BjXRzqm LrvjY6RbVpjNWP73Ec8Hy2zFxKn+25z35ZDPKTvubl9qdNnjs1Mb913iAkYd1HKeJ6oW r+ckn7Y9ApzEtUycLcpIN/jGPXpSTHanUUYuNWLAppxbpRs+KA51X6G8WoYuHvqGWQMn x+hg== X-Gm-Message-State: ALoCoQl42mM7MYS7rdDx9OJhtjFg7JUuzLhZH+t7SFQB7r5y1BvgqkJe73e8UR9zMECJ4J9gbxvT X-Received: by 10.195.13.104 with SMTP id ex8mr3945991wjd.12.1422450199851; Wed, 28 Jan 2015 05:03:19 -0800 (PST) Received: from [10.16.0.195] (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id p6sm2738068wia.14.2015.01.28.05.03.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Jan 2015 05:03:19 -0800 (PST) Message-ID: <54C8DDF3.2000802@6wind.com> Date: Wed, 28 Jan 2015 14:02:43 +0100 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-Version: 1.0 To: Prashant Upadhyaya , dev@dpdk.org References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] Regarding UDP 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: Wed, 28 Jan 2015 13:03:20 -0000 Hi Prashant, On 01/28/2015 12:25 PM, Prashant Upadhyaya wrote: > Hi, > > I am aware that this topic has been discussed several times before, but I > am somehow still stuck with this. > > I am using dpdk 1.6r1, intel 82599 NIC. > I have an mbuf, I have hand-constructed a UDP packet (IPv4) in the data > portion, filled the relevant fields of the headers and I do a tx burst. No > problems, the destination gets the packet. I filled UDP checksum as zero > and there was no checksum offloaded in ol_flags. > > Now in the same usecase, I want to offload UDP checksum. > I am aware that the checksum field in UDP header has to be filled with the > pseudo header checksum, I did that, duly added the PKT_TX_UDP_CKSUM flag in > ol_flags, did a tx_burst and the packet does not reach the destination. > > I realized that I have to fill the following fields as well (my packet does > not have vlan tag) > mbuf->pkt.vlan_macip.f.l2_len > mbuf->pkt.vlan_macip.f.l3_len > > so I filled the l2_len as 14 and l3_len as 20 (IP header with no options) > Yet the packet did not reach the destination. > > So my question is -- am I filling the l2_len and l3_len properly ? > Is there anything else to be done before I can get this UDP checksum > offload to work properly for me. As far as I remember, this should be working on 1.6r1. When you say "did not reach the destination", do you mean that the packet is not transmitted at all? Or is it transmitted with a wrong checksum? I think you should try to reproduce the issue with the latest DPDK which is known to work with test-pmd (csum forward engine). Regards, Olivier