From: "Hanoch Haim (hhaim)" Subject: Question/bug net/i40e i40e_pf_config_rss/reta API DPDK 17.11 Date: Mon, 4 Dec 2017 13:19:56 +0000 Message-ID: <73518a84b1064e0cb24a40b1bf76aab0@XCH-RTP-017.cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: "Wu, Jingjing (jingjing.wu@intel.com)" , "Hanoch Haim (hhaim)" To: "dev@dpdk.org" Return-path: Received: from rcdn-iport-5.cisco.com (rcdn-iport-5.cisco.com [173.37.86.76]) by dpdk.org (Postfix) with ESMTP id 40136239 for ; Mon, 4 Dec 2017 14:19:59 +0100 (CET) Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi All, I want to configure 4 RX queues when rx-queue=3D1 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 =3D ETH_MQ_RX_RSS; port_conf.rx_adv_conf.rss_conf.rss_hf =3D 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 .. =3D=3D> i40e_pf_config_rss(struct i40e_pf *pf) { struct i40e_hw *hw =3D I40E_PF_TO_HW(pf); struct rte_eth_rss_conf rss_conf; uint32_t i, lut =3D 0; uint16_t j, num; /* * If both VMDQ and RSS enabled, not all of PF queues are co= nfigured. * 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 =3D i40e_pf_calc_configured_queues_num(= pf); else num =3D pf->dev_data->nb_rx_queues; num =3D RTE_MIN(num, I40E_MAX_Q_PER_TC); PMD_INIT_LOG(INFO, "Max of contiguous %u PF queues are conf= igured", num); if (num =3D=3D 0) { PMD_INIT_LOG(ERR, "No PF queues are configu= red to enable RSS"); return -ENOTSUP; } #ifndef TREX_PATCH for (i =3D 0, j =3D 0; i < hw->func_caps.rss_table_size; i+= +, j++) { if (j =3D=3D num) j =3D 0; lut =3D (lut << 8) | (j & ((0x1 << hw->func_caps.rss_table_ent= ry_width) - 1)); if ((i & 3) =3D=3D 3) I40E_WRITE_REG(hw, I40E_PFQ= F_HLUT(i >> 2), lut); } #endif 4) Needless to say that I don't want to call the reta API *after* I en= able 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