From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=20499; q=dns/txt; s=iport; t=1512393599; x=1513603199; h=from:to:cc:subject:date:message-id:mime-version; bh=9V9iwB3Lw1+P2v0O7eUFkZ+Dqodt5vUhBf8f22cOFg0=; b=b50Ja+Fc20LyCOEXB4S5i2tVD51Wo5eW40hxaxeYpHb8C+N9UHxccM4b RBdFw+NslrPyUfEoDHmk38s6WGszfrhVHxuo4MGj76jLBUAYIfWd98X1t ef7uN0O2Zyt6w3nyYdRNfsciqH/LZESqZN7Srf6tcDdjA8FPDCpHErpXO A=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DfAABGSiVa/4YNJK1cGQEBAQEBAQEBA?= =?us-ascii?q?QEBAQcBAQEBAYJKcmZuJweOGI53lAuEc4IVCiWFFoUyPxgBAQEBAQEBAQFrHQu?= =?us-ascii?q?FUAZMEgFAQCYBBA4NiTZkEKlAOopUAQEBAQEBAQEBAQEBAQEBAQEBAQEBGAWFU?= =?us-ascii?q?YFWgWmGQ4gBBZJTkBkCh3KNFJNfSIw2iSICERkBgTkBHzmBTW8VgmSEVHiJBgG?= =?us-ascii?q?BEwEBAQ?= X-IronPort-AV: E=Sophos;i="5.45,359,1508803200"; d="scan'208,217";a="110291198" Received: from alln-core-12.cisco.com ([173.36.13.134]) by rcdn-iport-5.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 04 Dec 2017 13:19:57 +0000 Received: from XCH-RTP-018.cisco.com (xch-rtp-018.cisco.com [64.101.220.158]) by alln-core-12.cisco.com (8.14.5/8.14.5) with ESMTP id vB4DJvjF023079 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Mon, 4 Dec 2017 13:19:57 GMT Received: from xch-rtp-017.cisco.com (64.101.220.157) by XCH-RTP-018.cisco.com (64.101.220.158) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Mon, 4 Dec 2017 08:19:56 -0500 Received: from xch-rtp-017.cisco.com ([64.101.220.157]) by XCH-RTP-017.cisco.com ([64.101.220.157]) with mapi id 15.00.1320.000; Mon, 4 Dec 2017 08:19:56 -0500 From: "Hanoch Haim (hhaim)" To: "dev@dpdk.org" CC: "Wu, Jingjing (jingjing.wu@intel.com)" , "Hanoch Haim (hhaim)" Thread-Topic: [dpdk-dev] Question/bug net/i40e i40e_pf_config_rss/reta API DPDK 17.11 Thread-Index: AdNtApK3ob4SrG56QseSwLYeHRKKlg== Date: Mon, 4 Dec 2017 13:19:56 +0000 Message-ID: <73518a84b1064e0cb24a40b1bf76aab0@XCH-RTP-017.cisco.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [64.103.125.71] MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Question/bug net/i40e i40e_pf_config_rss/reta API DPDK 17.11 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 13:19:59 -0000 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