From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E47DBA04FD; Tue, 14 Jan 2020 06:52:36 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9CE5B1C2AD; Tue, 14 Jan 2020 06:52:35 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id AFF291C1F2; Tue, 14 Jan 2020 06:52:33 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00E5oORE018349; Mon, 13 Jan 2020 21:52:32 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=bOy+ISPnLhpcDtW7B3OVMcyLUFWvi4B09bizO68M9D8=; b=dSG3De4O1RjvX4zValzlPSf5JiydtZ/TcxqKWMv4R8oE+55eU4QlDSGftFrv6TEXaUN0 gqKun2GZYjuFkIpltobJ1yo++huh82A6Dr7lzX1g8ZyhbdHHShnEXoKMpcC2ujtwnyk4 BlRJodk3dJr+13R2RxfeC4tteWWelYyhhkgzvAtM+sc7S/bR+aMPE2LfwbzN4rQm+5MT 2GrffJntsndnTE+3aIWaj8v+zhHMx5yxYKc82dCoucczWpy14iNhFgkLzva+zeY50C/o Bg1HC/1HlZAIC4looDVu8oWxWusDMUTBhsUBl3Sb6FCjBs/GPEUR+8wZMpvLkyvMaNUr JQ== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2xfckurtw1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 13 Jan 2020 21:52:32 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 13 Jan 2020 21:52:30 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 13 Jan 2020 21:52:31 -0800 Received: from BG-LT7430.marvell.com (unknown [10.28.17.56]) by maili.marvell.com (Postfix) with ESMTP id E8EF03F7040; Mon, 13 Jan 2020 21:52:25 -0800 (PST) From: To: , Marko Kovacevic , Ori Kam , Bruce Richardson , "Radu Nicolau" , Akhil Goyal , "Tomasz Kantecki" , Sunil Kumar Kori , Pavan Nikhilesh CC: , , Satananda Burla Date: Tue, 14 Jan 2020 11:22:23 +0530 Message-ID: <20200114055224.1795-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191216053736.792-1-pbhagavatula@marvell.com> References: <20191216053736.792-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572 definitions=2020-01-14_01:2020-01-13, 2020-01-14 signatures=0 Subject: [dpdk-dev] [PATCH v2] examples/l2fwd-event: fix ethdev RSS setup 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Pavan Nikhilesh Setup RSS configuration based on underlying device capabilities. Fixes: 4ff457986f76 ("examples/l2fwd-event: add default poll mode routines") Cc: stable@dpdk.org Signed-off-by: Satananda Burla Signed-off-by: Pavan Nikhilesh --- v2 Changes: - change the patch type to fix. examples/l2fwd-event/l2fwd_common.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/examples/l2fwd-event/l2fwd_common.c b/examples/l2fwd-event/l2fwd_common.c index 0c069ec35..2fae6f52c 100644 --- a/examples/l2fwd-event/l2fwd_common.c +++ b/examples/l2fwd-event/l2fwd_common.c @@ -46,6 +46,17 @@ l2fwd_event_init_ports(struct l2fwd_resources *rsrc) if (ret != 0) rte_panic("Error during getting device (port %u) info: %s\n", port_id, strerror(-ret)); + local_port_conf.rx_adv_conf.rss_conf.rss_hf &= + dev_info.flow_type_rss_offloads; + if (local_port_conf.rx_adv_conf.rss_conf.rss_hf != + port_conf.rx_adv_conf.rss_conf.rss_hf) { + printf("Port %u modified RSS hash function based on hardware support," + "requested:%#"PRIx64" configured:%#"PRIx64"", + port_id, + port_conf.rx_adv_conf.rss_conf.rss_hf, + local_port_conf.rx_adv_conf.rss_conf.rss_hf); + } + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE) local_port_conf.txmode.offloads |= DEV_TX_OFFLOAD_MBUF_FAST_FREE; -- 2.17.1