Hi Konstantin,
On 2/26/2016 9:14 PM, Ananyev, Konstantin wrote:
> Hi Jianfeng,
>
>> +static int
...
>> +if (hdr_len == sizeof(struct ipv4_hdr) &&
>> +(hdr->next_proto_id == 6 ||
>> + hdr->next_proto_id == 17))
> Use IPPORTO_UDP,
> > Actually it is a good point:
> > for EM case should l3fwd process only TCP/UDP packets?
> > If yes, then it needs to check not only L3, but also L4 type too
> > Which means that for EM and LPM check_packet_type_ok() should also be
> > different.
> > Or we can leave it as it is - in that case
Hi Jianfeng,
>
> +static int
> +check_packet_type_ok(int portid)
> +{
> + int i, ret;
> + int ptype_l3_ipv4 = 0, ptype_l3_ipv6 = 0;
> +
> + ret = rte_eth_dev_get_ptype_info(portid, RTE_PTYPE_L3_MASK, NULL, 0);
> + if (ret <= 0)
> + return 0;
> +
> + uint32_t
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 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.
Under the mode of EXACT_MATCH, ip
4 matches
Mail list logo