From: "Hanoch Haim (hhaim)" <hhaim@cisco.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: "Wu, Jingjing (jingjing.wu@intel.com)" <jingjing.wu@intel.com>,
"Hanoch Haim (hhaim)" <hhaim@cisco.com>
Subject: [dpdk-dev] Question/bug net/i40e i40e_pf_config_rss/reta API DPDK 17.11
Date: Mon, 4 Dec 2017 13:19:56 +0000 [thread overview]
Message-ID: <73518a84b1064e0cb24a40b1bf76aab0@XCH-RTP-017.cisco.com> (raw)
Hi All,
I want to configure 4 RX queues when rx-queue=1 is masked by RSS
So in case I have 4 rx-queues 0,1,2,3 I want to get packets only from 0,2,3 by RSS. Not so complex.
1) Enable RSS
port_conf.rxmode.mq_mode = ETH_MQ_RX_RSS;
port_conf.rx_adv_conf.rss_conf.rss_hf = ETH_RSS_PROTO_MASK;
2) Configure RETA tables using this code
rte_eth_dev_rss_reta_update() /rte_eth_dev_rss_reta_query()
https://github.com/cisco-system-traffic-generator/trex-core/blob/master/src/main_dpdk.cpp#L5925
query shows the right value 0,2,3,0,2,3..
3) Call rte_eth_dev_start();
However the *start* function call i40e_pf_config_rss for i40e rewrite the reta TABLE with default value ..
==>
i40e_pf_config_rss(struct i40e_pf *pf)
{
struct i40e_hw *hw = I40E_PF_TO_HW(pf);
struct rte_eth_rss_conf rss_conf;
uint32_t i, lut = 0;
uint16_t j, num;
/*
* If both VMDQ and RSS enabled, not all of PF queues are configured.
* It's necessary to calculate the actual PF queues that are configured.
*/
if (pf->dev_data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_VMDQ_FLAG)
num = i40e_pf_calc_configured_queues_num(pf);
else
num = pf->dev_data->nb_rx_queues;
num = RTE_MIN(num, I40E_MAX_Q_PER_TC);
PMD_INIT_LOG(INFO, "Max of contiguous %u PF queues are configured",
num);
if (num == 0) {
PMD_INIT_LOG(ERR, "No PF queues are configured to enable RSS");
return -ENOTSUP;
}
#ifndef TREX_PATCH
for (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {
if (j == num)
j = 0;
lut = (lut << 8) | (j & ((0x1 <<
hw->func_caps.rss_table_entry_width) - 1));
if ((i & 3) == 3)
I40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut);
}
#endif
4) Needless to say that I don't want to call the reta API *after* I enable the device.
5) I expect the driver to save my configuration and only when I start the device to configure it.
Am I missing something?
Thanks,
Hanoh
reply other threads:[~2017-12-04 13:19 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=73518a84b1064e0cb24a40b1bf76aab0@XCH-RTP-017.cisco.com \
--to=hhaim@cisco.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
/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).