From: Olivier MATZ <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: Alex Markuze <alex-I7wstvAgZDk@public.gmane.org>,
"dev-VfR2kkLFssw@public.gmane.org"
<dev-VfR2kkLFssw@public.gmane.org>
Subject: Re: UDP Checksum
Date: Thu, 06 Nov 2014 17:15:00 +0100 [thread overview]
Message-ID: <545B9E84.2090701@6wind.com> (raw)
In-Reply-To: <CAKfHP0WWCrftSR=z=jvUsHCLtTZdBwch0ZvadiLa9nMfcbpW-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Hello,
On 11/06/2014 05:05 PM, Alex Markuze wrote:
> I'm seeing "UDP: bad checksum." messages(dmesg) for packets sent by my dpdk
> app to a socket on a remote machine.
> Looking at the packets the scum value is set, its just not what wireshark
> expects.
>
> When sending I'm setting these fields in the egress packets.
>
> pkt->pkt.vlan_macip.f.l2_len = sizeof(struct ether_hdr);
>
> pkt->pkt.vlan_macip.f.l3_len = sizeof(struct ipv4_hdr);
>
> pkt->ol_flags |= (PKT_TX_IP_CKSUM | PKT_TX_L4_MASK);
> //PKT_TX_OFFLOAD_MASK;
I think you need to do:
pkt->pkt.vlan_macip.f.l2_len = sizeof(struct ether_hdr);
pkt->pkt.vlan_macip.f.l3_len = sizeof(struct ipv4_hdr);
pkt->ol_flags |= (PKT_TX_IP_CKSUM | PKT_TX_UDP_CKSUM);
ipv4_hdr->hdr_checksum = 0;
udp_hdr->dgram_cksum = 0;
udp_hdr->dgram_cksum = get_ipv4_psd_sum(ipv4_hdr); /* see csumonly.c */
Regards,
Olivier
next prev parent reply other threads:[~2014-11-06 16:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-06 16:05 UDP Checksum Alex Markuze
[not found] ` <CAKfHP0WWCrftSR=z=jvUsHCLtTZdBwch0ZvadiLa9nMfcbpW-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-06 16:15 ` Olivier MATZ [this message]
2014-11-06 16:15 ` Ananyev, Konstantin
[not found] ` <2601191342CEEE43887BDE71AB977258213A2E79-kPTMFJFq+rEu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-11-06 16:26 ` Alex Markuze
[not found] ` <2601191342CEEE43887BDE71AB977258213A2EC5@IRSMSX105.ger.corp.intel.com>
[not found] ` <2601191342CEEE43887BDE71AB977258213A2EC5-kPTMFJFq+rEu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-11-06 17:07 ` Ananyev, Konstantin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=545B9E84.2090701@6wind.com \
--to=olivier.matz-pdr9zngts4eavxtiumwx3w@public.gmane.org \
--cc=alex-I7wstvAgZDk@public.gmane.org \
--cc=dev-VfR2kkLFssw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.