Skip to contentSkip to conversation

Using flow director to distrbute vlan traffic

DISCUSSION Viswanath Alikonda 2 participants 2 messages Mar 25, 2014 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 1543825346.28747.1395748063246.JavaMail.root@linmail

#1 lore raw

Hi,

I am using DPDK 1.4 and trying to distribute traffic based on (IP,vlan). I expect the traffic of (IP,vlan) goes to one core. The code looks like this:

    struct   rte_fdir_masks fdir_masks;
    struct   rte_fdir_filter fdir_filter;

    memset(&fdir_masks, 0, sizeof(struct rte_fdir_masks));
    fdir_masks.src_ipv4_mask = HHIP_MASK;
    memset(&fdir_filter, 0, sizeof(struct rte_fdir_filter));
    fdir_filter.iptype = RTE_FDIR_IPTYPE_IPV4;
    fdir_masks.only_ip_flow  = 0;
    rte_eth_dev_fdir_set_masks(port, &fdir_masks);
    fdir_filter.l4type = RTE_FDIR_L4TYPE_NONE;
    fdir_filter.ip_src.ipv4_addr = map[i].hh_lan_ip;
    fdir_filter.vlan_id = map[i].vlan_id;
    err = rte_eth_dev_fdir_add_signature_filter(port, &fdir_filter, 1 + map[i].core);

In DPDK 1.4, the vlan is stripped while filtering itself. But, I am unable to distribute it to the particular core. Can anyone through some light on this.

Thanks & Regards,
Viswanath

#2 lore raw
Quoted 9 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Viswanath Alikonda
Sent: Tuesday, March 25, 2014 11:55 AM
To: [email protected]
Subject: [dpdk-dev] Using flow director to distrbute vlan traffic

Hi,

I am using DPDK 1.4 and trying to distribute traffic based on (IP,vlan). I expect the traffic of (IP,vlan) goes to one core. The code looks like this:

Can't know for sure what the specific issue is in this case, but a general point to watch out for with the flow director APIs is byte ordering - check that the parameters are specified in network byte order where appropriate, e.g. vlan tag. [See cmd_pkt_filter_parsed() function inside the testpmd app to see how the parameters to the flow director filter need to be set.]

/Bruce