[dpdk-dev] RSS hashing using L2_PAYLOAD type - Flexible Payload

Rajaraman Balasubramanian rajaramanb20 at gmail.com
Sat Feb 2 09:52:45 CET 2019


Hi DPDK Team,

    I am working on  VPP (vector packet processing) application which
receives packets through i40e dpdk driver (Fortville eth device in the NIC
card) with unknown eth_type.



    After this eth_type, we have our own header. I tried using “RSS with
flexible payload”. That is, after outer Ethernet header eth_type of 0x8772,
I have given 8 words (16 bytes) as fields to RSS hash function.



    And we have configured two queues for each port and packets are NOT
distributed across rx_queues. We have checked this using “show runtime”
command in VPP. When we use the function rte_eth_dev_info_get() function to
check RSS offloads in dev_info struct. It outputs “hash_key_size:52
flow_type_rss_offloads:0x7ef8”. This means that RSS_L2_PAYLOAD is enabled.



    Also I would like to understand the meaning of this macro
RTE_ETH_FLOW_L2_PAYLOAD to check whether my above thought process is
correct. I have written the code as follows.



    struct rte_eth_hash_filter_info filter_info;



    memset(&filter_info, 0, sizeof(filter_info));



    filter_info.info_type = RTE_ETH_HASH_FILTER_INPUT_SET_SELECT;

    filter_info.info.input_set_conf.flow_type = RTE_ETH_FLOW_L2_PAYLOAD;

    filter_info.info.input_set_conf.inset_size = 8;



    filter_info.info.input_set_conf.field[0] =
RTE_ETH_INPUT_SET_FLEX_PAYLOAD_1ST_WORD;

    filter_info.info.input_set_conf.field[1] =
RTE_ETH_INPUT_SET_FLEX_PAYLOAD_2ND_WORD;

    filter_info.info.input_set_conf.field[2] =
RTE_ETH_INPUT_SET_FLEX_PAYLOAD_3RD_WORD;

    filter_info.info.input_set_conf.field[3] =
RTE_ETH_INPUT_SET_FLEX_PAYLOAD_4TH_WORD;

    filter_info.info.input_set_conf.field[4] =
RTE_ETH_INPUT_SET_FLEX_PAYLOAD_5TH_WORD;

    filter_info.info.input_set_conf.field[5] =
RTE_ETH_INPUT_SET_FLEX_PAYLOAD_6TH_WORD;

    filter_info.info.input_set_conf.field[6] =
RTE_ETH_INPUT_SET_FLEX_PAYLOAD_7TH_WORD;

    filter_info.info.input_set_conf.field[7] =
RTE_ETH_INPUT_SET_FLEX_PAYLOAD_8TH_WORD;



    filter_info.info.input_set_conf.op = RTE_ETH_INPUT_SET_ADD;



    filter_ret = rte_eth_dev_filter_ctrl(xd->port_id, RTE_ETH_FILTER_HASH,
RTE_ETH_FILTER_SET, &filter_info);



Thanks,

Rajaram.


More information about the dev mailing list