DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] HW offloaded calculation of UDP checksum not working
@ 2020-07-06 11:31 David Aldrich
  0 siblings, 0 replies; only message in thread
From: David Aldrich @ 2020-07-06 11:31 UTC (permalink / raw)
  To: users

Viewed 3 times
I am working with DPDK version 18.11.8 stable on Linux with an Intel X722

My app works fine if I calculate IP and UDP checksums in software but I get
a segmentation fault if I calculate in hardware. Here is my code:

local_port_conf.txmode.offloads  = local_port_conf.txmode.offloads |

mb->l2_len = sizeof(struct ether_hdr);
mb->l3_len = sizeof(struct ipv4_hdr);
mb->l4_len = sizeof(struct udp_hdr);
p_ip_hdr->hdr_checksum = 0;
p_udp_hdr->dgram_cksum = rte_ipv4_phdr_cksum((const ipv4_hdr*)(mb->l3_len),

The rte_ipv4_phdr_cksum() call is mysterious, have I understood what to do

Understandably, the C++ compiler gaves a warning:

warning: cast to pointer from integer of different size
         p_udp_hdr->dgram_cksum = rte_ipv4_phdr_cksum((const
ipv4_hdr*)(ptMbuf->l3_len), ptMbuf->ol_flags);


What is wrong with my code?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-06 11:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06 11:31 [dpdk-users] HW offloaded calculation of UDP checksum not working David Aldrich

DPDK usage discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/users/0 users/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 users users/ https://inbox.dpdk.org/users \
	public-inbox-index users

Example config snippet for mirrors.
Newsgroup available over NNTP:

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