From: Chillance Zen <chillancezen@gmail.com>
To: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] checksum and vlan insertion seem not working on X520
Date: Wed, 8 Mar 2017 19:21:27 +0800 [thread overview]
Message-ID: <CAKQ7xkWfApgrxZhU4PsObOwjMTcSO2HSkYG7R=1pGozSFwjxqg@mail.gmail.com> (raw)
In-Reply-To: <2601191342CEEE43887BDE71AB9772583FACBD67@IRSMSX109.ger.corp.intel.com>
Hi Konstantin,Thank you sooooooooooooooooooooooooooooo much ,I really
appreciate your suggestion...
it works well now ,I love it.
Linc
On 8 March 2017 at 17:20, Ananyev, Konstantin <konstantin.ananyev@intel.com>
wrote:
> Hi Linc,
>
> Wonder what TX function are you using?
> Make sure that you are not using simple TX function that doesn’t support
> any offloads or multiseg packets.
> You need something like that at setup phase:
>
> rte_eth_dev_info_get(port_id, &dev_info);
> dev_info.default_txconf.txq_flags = 0;
> ...
> rte_eth_tx_queue_setup(…, &dev_info.default_txconf);
>
> Konstantin
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Chillance Zen
> > Sent: Wednesday, March 8, 2017 8:50 AM
> > To: dev@dpdk.org
> > Subject: [dpdk-dev] checksum and vlan insertion seem not working on X520
> >
> > Hi ,every one
> >
> > when I was conducting nic offloading exp,I can not make a x520 nic insert
> > vlan ,nor checksum,
> > here is my rx/tx capability:
> > rx offload capability:9f
> > tx offload capability:203f
> >
> > with code like this:
> > while(1){
> > nr_mbufs=rte_eth_rx_burst(0,queue_id,mbufs,32);
> > for(idx=0;idx<nr_mbufs;idx++){
> > #if 0
> > buffer=rte_pktmbuf_mtod(mbufs[idx],char*);
> > ip4=(struct ipv4_hdr*)(buffer+14);
> > ip4->hdr_checksum=0;
> > mbufs[idx]->l2_len=14;
> > mbufs[idx]->l3_len=20;
> > mbufs[idx]->ol_flags=PKT_TX_IP_CKSUM|PKT_TX_IPV4;
> > #else
> > mbufs[idx]->vlan_tci=0xef00;
> > mbufs[idx]->ol_flags=PKT_TX_VLAN_PKT;
> > #endif
> > rte_eth_tx_burst(0,queue_id,&mbufs[idx],1);
> > }
> > }
> >
> > does anybody know what;s wrong with my code?
> > Thanks & regards
> > Linc
>
--
Linc @bjtu
prev parent reply other threads:[~2017-03-08 11:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 8:49 Chillance Zen
2017-03-08 9:20 ` Ananyev, Konstantin
2017-03-08 11:21 ` Chillance Zen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKQ7xkWfApgrxZhU4PsObOwjMTcSO2HSkYG7R=1pGozSFwjxqg@mail.gmail.com' \
--to=chillancezen@gmail.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).