[dpdk-dev] How to calculate checksum automically with NIC when sending a packet?
Vladimir Medvedkin
medvedkinv at gmail.com
Fri Nov 22 13:07:42 CET 2013
Hi,
If you need only ip checksum:
struct rte_mbuf *m;
m->ol_flags |= PKT_TX_IP_CKSUM;
if you need to calculate tcp checksum add also PKT_TX_TCP_CKSUM flag to
ol_flags field and caclulate pseudoheader checksum (see get_ipv4_psd_sum()
in app/test-pmd/csumonly.c)
struct tcp_hdr *th;
th->cksum = get_ipv4_psd_sum(iph);
Regards,
Vladimir
2013/11/22 William Rolinson <mydpdk at 126.com>
> RT~
>
More information about the dev
mailing list