Skip to contentSkip to conversation

82599 TX IP checksum offloading

DISCUSSION chen_lp 2 participants 2 messages Nov 25, 2013 1 message not in the archive

lore
Share & tools
lore

chen_lp

author
#0 lore raw

Hi,
I want NIC to calculate ip checksum on dpdk-1.5.0,

I have set:

static const struct rte_eth_txconf tx_conf = {
	.tx_thresh = {
		.pthresh = TX_PTHRESH,
		.hthresh = TX_HTHRESH,
		.wthresh = TX_WTHRESH,
	},
	.tx_free_thresh = 0, 
	.tx_rs_thresh = 0, 
	.txq_flags = 0,    
};
this struct is used by int rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id,
				  uint16_t nb_tx_desc, unsigned int socket_id,
				  const struct rte_eth_txconf **tx_conf*);

when constructing the pkt will been sending:

mbuf->ol_flags|=(PKT_TX_IP_CKSUM|PKT_RX_IPV4_HDR); |~
mbuf->pkt.vlan_macip.f.l2_len = sizeof(struct ether_hdr); |~
mbuf->pkt.vlan_macip.f.l3_len = sizeof(struct ipv4_hdr);

but the NIC not calculate ip checksum,did anyone tell me what's wrong whith it? by the way,I create multi-queue for tx and rx.

Thanks,
chen_lp

---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful.If you have received this communication in error,please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you.
---------------------------------------------------------------------------------------------------

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

chen_Ip,

You shoudln't use PKT_RX_IPV4_HDR, either just PKT_TX_IP_CKSUM or some other combination of PKT_TX_* (e.g. PKT_TX_OFFLOAD_MASK)

Daniel

Quoted 55 lines · chen_lp

Hi,
I want NIC to calculate ip checksum on dpdk-1.5.0,

I have set:

static const struct rte_eth_txconf tx_conf = {
        .tx_thresh = {
                .pthresh = TX_PTHRESH,
                .hthresh = TX_HTHRESH,
                .wthresh = TX_WTHRESH,
        },
        .tx_free_thresh = 0,
        .tx_rs_thresh = 0,
        .txq_flags = 0,
};

this struct is used by int rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id,
uint16_t nb_tx_desc, unsigned int
socket_id,

                                  const struct rte_eth_txconf **tx_conf*);

when constructing the pkt will been sending:

mbuf->ol_flags|=(PKT_TX_IP_CKSUM|PKT_RX_IPV4_HDR);
                                           |~
mbuf->pkt.vlan_macip.f.l2_len = sizeof(struct ether_hdr);
                                            |~

mbuf->pkt.vlan_macip.f.l3_len = sizeof(struct ipv4_hdr);

but the NIC not calculate ip checksum,did anyone tell me what's wrong whith it?
by the way,I create multi-queue for tx and rx.

Thanks,
chen_lp

---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential and/or privileged of
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is
not the intended recipient, unauthorized use, forwarding, printing,
storing, disclosure or copying
is strictly prohibited, and may be unlawful.If you have received this communication in error,please
immediately notify the sender by return e-mail, and delete the original message and all copies from
your system. Thank you.

---------------------------------------------------------------------------------------------------