DPDK usage discussions
 help / color / mirror / Atom feed
From: "黄 学森" <hxs625job@outlook.com>
To: "users@dpdk.org" <users@dpdk.org>
Subject: [dpdk-users]  RSS Support in X722
Date: Mon, 11 Nov 2019 05:34:19 +0000	[thread overview]
Message-ID: <52151AC2-6B95-40DA-90A8-474CD1ADA41D@outlook.com> (raw)

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

                 reply	other threads:[~2019-11-11  5:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52151AC2-6B95-40DA-90A8-474CD1ADA41D@outlook.com \
    --to=hxs625job@outlook.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).