[dpdk-dev] [PATCH] examples/l3fwd: fix using packet type blindly

2016-03-01 Thread Tan, Jianfeng
Hi Konstantin, On 3/1/2016 9:51 PM, Ananyev, Konstantin wrote: > Hi Jianfeng, > >> -Original Message- >> From: Tan, Jianfeng >> Sent: Tuesday, March 01, 2016 1:24 AM >> To: dev at dpdk.org >> Cc: Zhang, Helin; Ananyev, Konstantin; nelio.laranjeiro at 6wind.com; >> adrien.mazarguil at

[dpdk-dev] [PATCH] examples/l3fwd: fix using packet type blindly

2016-03-01 Thread Ananyev, Konstantin
> >> + > >> +void > >> +lpm_parse_ptype(struct rte_mbuf *m) > >> +{ > >> + struct ether_hdr *eth_hdr; > >> + uint32_t packet_type = 0; > >> + uint16_t ethertype; > >> + > >> + eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *); > >> + ethertype = rte_be_to_cpu_16(eth_hdr->ether_type); > >> +

[dpdk-dev] [PATCH] examples/l3fwd: fix using packet type blindly

2016-03-01 Thread Ananyev, Konstantin
Hi Jianfeng, > -Original Message- > From: Tan, Jianfeng > Sent: Tuesday, March 01, 2016 1:24 AM > To: dev at dpdk.org > Cc: Zhang, Helin; Ananyev, Konstantin; nelio.laranjeiro at 6wind.com; > adrien.mazarguil at 6wind.com; rahul.lakkireddy at chelsio.com; > pmatilai at redhat.com; Tan,

[dpdk-dev] [PATCH] examples/l3fwd: fix using packet type blindly

2016-03-01 Thread Jianfeng Tan
As a example to use ptype info, l3fwd needs firstly to use rte_eth_dev_get_ptype_info() API to check if device and/or its PMD driver will parse and fill the needed packet type; if not, use the newly added option, --parse-ptype, to analyze it in the callback softly. As the mode of EXACT_MATCH uses