[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dpdk-users
Subject:    [dpdk-users]  RSS Support in X722
From:       <hxs625job () outlook ! com>
Date:       2019-11-11 5:34:19
Message-ID: 52151AC2-6B95-40DA-90A8-474CD1ADA41D () outlook ! com
[Download RAW message or body]

Hi,

I¡¯m using Intel Corporation Ethernet Connection X722 for 10GbE SFP+, and dpdk 17.02. \
I try to use RSS hashed by ONLY ipv4 src ip. The codes below work fine in Intel \
Corporation 82599ES 10-Gigabit SFI/SFP+: static struct rte_eth_conf port_conf_rss = {
    .rxmode = {
        .mq_mode    = ETH_MQ_RX_RSS,
        .max_rx_pkt_len = ETHER_MAX_LEN,
        .split_hdr_size = 0,
        .header_split   = 0, /**< Header Split disabled */
        .hw_ip_checksum = 0, /**< IP checksum offload enabled */
        .hw_vlan_filter = 0, /**< VLAN filtering disabled */
        .jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
        .hw_strip_crc   = 0, /**< CRC stripped by hardware */
    },
    .rx_adv_conf = {
        .rss_conf = {
            .rss_key = NULL,
            .rss_hf =  ETH_RSS_IP,
        },
    },
    .txmode = {
        .mq_mode = ETH_MQ_TX_NONE,
    },
};
rte_eth_dev_configure(port_id, nb_rx_q, nb_tx_q, &port_conf_rss);
/*  Omit some codes about queue init */
rte_eth_dev_start(port_id);

In i40e, it didn¡¯t work. So I got some reference and add these codes (only udp as an \
example): 

static void config_rss_parsed(void) {
    struct rte_eth_rss_conf rss_conf;

    rss_conf.rss_hf = ETH_RSS_UDP;
    rss_conf.rss_key = NULL;
    rte_eth_dev_rss_hash_update(i, &rss_conf);
}

void set_hash_input_set(uint8_t port_id, uint32_t set_type,
        uint16_t ftype, enum rte_eth_input_set_field set_field){
    struct rte_eth_hash_filter_info info;
    int ret;

    memset(&info, 0, sizeof(info));
    info.info_type = RTE_ETH_HASH_FILTER_INPUT_SET_SELECT;
    info.info.input_set_conf.flow_type = ftype;
    info.info.input_set_conf.field[0] = set_field;
    info.info.input_set_conf.inset_size = 1;
    info.info.input_set_conf.op = set_type;

    ret = rte_eth_dev_filter_ctrl(port_id, RTE_ETH_FILTER_HASH,
            RTE_ETH_FILTER_SET, &info);
    if(ret < 0){
        log_msg(LOG_ERR, "do input set error, op_type=%d, ftype=%d\n", set_type, \
ftype);  exit(-1);
    }
}

config_rss_parsed();
set_hash_input_set(port_id, RTE_ETH_INPUT_SET_SELECT,
            RTE_ETH_FLOW_NONFRAG_IPV4_UDP, RTE_ETH_INPUT_SET_NONE);
set_hash_input_set(port_id, RTE_ETH_INPUT_SET_ADD,
            RTE_ETH_FLOW_NONFRAG_IPV4_UDP, RTE_ETH_INPUT_SET_L3_SRC_IP4);

It turns out that RTE_ETH_INPUT_SET_NONE and RTE_ETH_INPUT_SET_L3_SRC_IP4 seems not \
work, the udp packets are hashed by IP & PORT. And there aren¡¯t any err log. What \
should I do to let udp packets hashed by ONLY src ip in X722 NIC ?

Thanks for any help!

Skyler


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic