DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Question/bug net/i40e i40e_pf_config_rss/reta API DPDK 17.11
@ 2017-12-04 13:19 Hanoch Haim (hhaim)
  0 siblings, 0 replies; only message in thread
From: Hanoch Haim (hhaim) @ 2017-12-04 13:19 UTC (permalink / raw)
  To: dev; +Cc: Wu, Jingjing (jingjing.wu@intel.com), Hanoch Haim (hhaim)

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-04 13:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-04 13:19 [dpdk-dev] Question/bug net/i40e i40e_pf_config_rss/reta API DPDK 17.11 Hanoch Haim (hhaim)

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).