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.anan...@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-boun...@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