DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] UDP Checksum
@ 2014-11-06 16:05 Alex Markuze
  2014-11-06 16:15 ` Olivier MATZ
  2014-11-06 16:15 ` Ananyev, Konstantin
  0 siblings, 2 replies; 6+ messages in thread
From: Alex Markuze @ 2014-11-06 16:05 UTC (permalink / raw)
  To: dev

Hi,
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'm working with a 82599 VF.


Any thoughts? I'm not sure what else to check.

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [dpdk-dev] udp checksum
@ 2019-09-24 15:11 Khoussi, Siham (IntlAssoc)
  0 siblings, 0 replies; 6+ messages in thread
From: Khoussi, Siham (IntlAssoc) @ 2019-09-24 15:11 UTC (permalink / raw)
  To: dev

Dear all,

I have a question related to layer 4 checksum. I am creating a UDP packet by appending the layers in order (udp, ipv4, Eth). However, when  I run Wireshark on the receiving end I get: [UDPchecksum = missing (nor present]. Whereas, the checksum for ipv4 works fine.
Here is what I do:

.... Filling udp header
.....
Struct udp_hdr *udp=(struct udp_hdr*)rte_pktmbuf_prepend(mbuf, sizeof(*udp));
Udp->dgram_cksum=0;
Ipv4->hdr->hdr_cksum=0;
Udp->dgram_cksum= rte_ipv4_udptcp_cksum((const struct ipv4_hdr *)ipv4_hdr, (const void *)udp);
Ipv4_hdr->hdr_cksum= rte_ipv4_cksum((const struct ipv4_hdr *)ipv4_hdr);

--- continue filling ipv4 fields
...

Does anyone have an idea why rte_ipv4_udptcp_cksum() not working?

Thank you,
Siham


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-09-24 15:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-06 16:05 [dpdk-dev] UDP Checksum Alex Markuze
2014-11-06 16:15 ` Olivier MATZ
2014-11-06 16:15 ` Ananyev, Konstantin
2014-11-06 16:26   ` Alex Markuze
     [not found]     ` <2601191342CEEE43887BDE71AB977258213A2EC5@IRSMSX105.ger.corp.intel.com>
2014-11-06 17:07       ` Ananyev, Konstantin
2019-09-24 15:11 [dpdk-dev] udp checksum Khoussi, Siham (IntlAssoc)

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git