DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] 82599 TX IP checksum offloading
@ 2013-11-25  6:23 chen_lp
  2013-11-25  9:15 ` Daniel Kaminsky
  0 siblings, 1 reply; 2+ messages in thread
From: chen_lp @ 2013-11-25  6:23 UTC (permalink / raw)
  To: dev

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. 
---------------------------------------------------------------------------------------------------

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

* Re: [dpdk-dev] 82599 TX IP checksum offloading
  2013-11-25  6:23 [dpdk-dev] 82599 TX IP checksum offloading chen_lp
@ 2013-11-25  9:15 ` Daniel Kaminsky
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Kaminsky @ 2013-11-25  9:15 UTC (permalink / raw)
  To: chen_lp; +Cc: dev

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


On Mon, Nov 25, 2013 at 8:23 AM, chen_lp <chen_lp@neusoft.com> wrote:

> 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.
>
> ---------------------------------------------------------------------------------------------------
>

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

end of thread, other threads:[~2013-11-25  9:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-25  6:23 [dpdk-dev] 82599 TX IP checksum offloading chen_lp
2013-11-25  9:15 ` Daniel Kaminsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).