From patchwork Thu Mar 9 22:00:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriram Yagnaraman X-Patchwork-Id: 13172080 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8F440C74A5B for ; Mon, 13 Mar 2023 08:55:18 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pbdxL-0006xs-DU; Mon, 13 Mar 2023 04:54:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pbdxK-0006xh-FR for qemu-devel@nongnu.org; Mon, 13 Mar 2023 04:54:58 -0400 Received: from mail-am6eur05on20706.outbound.protection.outlook.com ([2a01:111:f400:7e1b::706] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pbdxI-0005qS-LF for qemu-devel@nongnu.org; Mon, 13 Mar 2023 04:54:58 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WQ8wWp+PnQzvssvRr44qQ7AV/KFShKhDg4Wi9WQXZM6jsACtqiQityDlcsxEvLw1P9Nq523oVQLNbnKF/fAOZSsVBybRFFhIaWPu4gwWpw5FFoQoZcDK3tQ8keVLjOTBelYyH3cpuupwj9lx4aHCvbszzgCNm3KOiVW9cYHdOQp8Awbo9krHjvuK+HYetqz+7uAyNr8NOmmV2r5+c7MD3GNAv4vIyDxYwsg20FwuUwtUfvbf3A0yQYooS+2WIQtMF9k/MvnZ2q2YKjB3FWKn/EY0fAH9UAoizSyb70g1ZNpDDUFme4LLskdp3C7e259thJhX3rh4qtHt+vSOlk9J3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OZHRn57Hk8aHSg2InztEgw937fYItoUUlB+7TY7If6s=; b=DwZR5CoLi0tPlR50FuYpfqUfGLQigEPOhbcLJOB8LCAN3zO1S8IqZIk7F8IR3mR2UfJMBNUt0m1LhX1klzf2Dx7ex0aHaNjA1aKrLhAcjl8WzFLDK3kqTpbQRWM1XJywizq0erXxT2/0YvGmPtNh0nWf2+ludcOvw6ZAWGmjUl0TjJitVmhJHzmI+jRJSSJbAzf75Hv/DYq74Gr0nTtEkkVLFmiWKPrqTibuwYBaVJ2n/a2B6dXW+UsyszWHJQaDlcaxVY7e8blsHeCNC+T1SUJLgjkq7ZL4Dm8zGeXs1HeSsofEOq2iFw3QwksBiYbIQpmNWDAeQOM4mHYTfuDkdw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=est.tech; dmarc=pass action=none header.from=est.tech; dkim=pass header.d=est.tech; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=estab.onmicrosoft.com; s=selector2-estab-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OZHRn57Hk8aHSg2InztEgw937fYItoUUlB+7TY7If6s=; b=DkwR3ymckrNLUbaRfrVIiMI16W24VkVPYxvkoVfgocd6BzChmaWQx2UXEwyM7i5F5CYtjeNNTXmw1WOInj1FKTml2G09+F1HnY/Op5Z497rQUWk513GwGtHX9CanHZB0mI4RVGz9WoARyIUdxbQOmwejMkxizFzG43fySnk6d2o= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=est.tech; Received: from DBBP189MB1433.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:1e7::15) by PAXP189MB1928.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:277::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.24; Mon, 13 Mar 2023 08:54:50 +0000 Received: from DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::13ad:a312:15c6:91dc]) by DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::13ad:a312:15c6:91dc%9]) with mapi id 15.20.6178.024; Mon, 13 Mar 2023 08:54:49 +0000 From: Sriram Yagnaraman To: Cc: qemu-devel@nongnu.org, Akihiko Odaki , Jason Wang , Dmitry Fleytman , "Michael S . Tsirkin" , Marcel Apfelbaum , Sriram Yagnaraman Subject: [PATCH v7 6/8] igb: respect E1000_VMOLR_RSSE Date: Thu, 9 Mar 2023 23:00:10 +0100 Message-Id: <20230309220012.25642-7-sriram.yagnaraman@est.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230309220012.25642-1-sriram.yagnaraman@est.tech> References: <20230309220012.25642-1-sriram.yagnaraman@est.tech> X-ClientProxiedBy: GV3P280CA0034.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:9::31) To DBBP189MB1433.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:1e7::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DBBP189MB1433:EE_|PAXP189MB1928:EE_ X-MS-Office365-Filtering-Correlation-Id: 2083f56f-ebc1-435f-d1b7-08db23a09a62 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e/g9XxyjSido7mA4LveEIq6r28FRkSWjmO95zBHvjkJXaTSbYBOe6yeb2XEowbQWp9IF6X+Da39KkKD11P3+tsdTr7n9LmmpW4meosRvLDlJowtL8YHwrD7bVGAPwFJMZQtrERi4KRreMXDxWuLqcuxYhJ1/Khh+Y3nR/L129OYHqqAwfCSv0FUCWjJvPkHKt1Gle/bz2LhlSuvPx/TcVIpKzPgXCqQd1PbMqrGGHaZhpBZgrJIEHtzWsyA+5sB5lBQ53PgpcBwpcbnztT9ggAVHr5ooTcRkSZCndgIcQCt2rIdnbwPxc/KirVV4QVn3PwBwn57qAQ015GMDxWDetPmar7sRAQI3Ub1L0iPoni08fKKibh3jLPPSlnGrdGqgPMAfAKhwxIhugGSg/dQFR2cjMHmKd2FOZR86UGT9VqRU7Xeww2WfHL0iiI/JchZcF7KxvqQjlBgIyKyz91R1icNuSxHEftbtTNMlE3Iyo2RKDyRzMoejZQBdWyhbwZyt4MgPNZrr+vObJSlV4PeuR+4DFlWGguHLnYd6sw0smmjqDWTph1UVfO2XqnwIFCXNBIQVuRSIe4UIyjBKl7M7U8Ilm2JNDH75Ea7sHoDVJsysARnSdWC53HOrG2OMwjRymM76BTmgStuw09MXLeHcEAWpARCksJeD9NPVTiYSgXMsyfjRWwiMa8EmI5KGU/Tx2vTvHHNUzSRe/mJaJ6Ql57i5e8t/Fr3S8do5mdW7KlI= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBBP189MB1433.EURP189.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230025)(39830400003)(136003)(346002)(396003)(376002)(109986016)(451199018)(8936002)(2906002)(41300700001)(44832011)(66946007)(66556008)(5660300002)(66476007)(70586007)(4326008)(8676002)(4744005)(478600001)(83380400001)(54906003)(316002)(6486002)(36756003)(6506007)(6512007)(1076003)(6666004)(186003)(26005)(2616005)(38100700002)(86362001)(266003)(37730700002); DIR:OUT; SFP:1102; X-MS-Exchange-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waVtF0esBqBll5YRk99OHAauRDZ7hnBBvCT6NtkQwHxAT+EwnSBYMyaIC4dtciY7pBZNhc7reolJUfGqHKT3fQQ8ar4j6DI/NjX3TMh9GrLppvYWBJRtVe1RglDQcfjkF1sdFbR1W89cYLuQS+46myzSbhAsxo9BCWb4Dln9mcYsyIiZ6HtsPJUE4wJ7tRapCct7DnWm48D5qGczuOqQrNh8UYx8ZUwjzC4fFkxz1i8AI26fagZVEkY9um0bmhKpYBo1Zbgk+qjMjLttTdnMZy3OxlBM+8vdnEgSko1ofEwkL1X4nSYppbaNRRgvFp0xz5ACQsmrM7RbX0VmDlNSR8ljCWhV7boX7sI5QMtFaLQ6KG4CobIPW6I5+4oDTSLuXVpiXPEXwbJVJ7YoAX/gjt++f1WX0AoIdToRAAu5xHySU2GLpiClwArWXuqPhhD7A5CyjutTCeYpy4O3DSTPFmId0GanrnIs8R6BRcgnS0glRCeccjUsHvunj8VVRr1S6s946vpQkb8vqXv1p/wvxxyruejgu1PTxSwtzXqjvTA94R9U2OER+j5u2uAqkE00RgRtINewe8FjsCKzDAYz732l8sg== X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-Network-Message-Id: 2083f56f-ebc1-435f-d1b7-08db23a09a62 X-MS-Exchange-CrossTenant-AuthSource: DBBP189MB1433.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Mar 2023 08:54:49.6369 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d2585e63-66b9-44b6-a76e-4f4b217d97fd X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: np1++PWOMaSkD+UN8ngwi1nb3bF2ew+Ge9lqYQcsf80zBXdMY9DLD2lSwQbh8bvFHPFqUdtseGXrnQJP+xsD/S6UozJChMvjGikgz9tKXpk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXP189MB1928 Received-SPF: pass client-ip=2a01:111:f400:7e1b::706; envelope-from=sriram.yagnaraman@est.tech; helo=EUR05-AM6-obe.outbound.protection.outlook.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org RSS for VFs is only enabled if VMOLR[n].RSSE is set. Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index cb6993dd3b..f91cea20e5 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -1051,8 +1051,15 @@ static uint16_t igb_receive_assign(IGBCore *core, const struct eth_header *ehdr, if (queues) { igb_rss_parse_packet(core, core->rx_pkt, external_tx != NULL, rss_info); + /* Sec 8.26.1: PQn = VFn + VQn*8 */ if (rss_info->queue & 1) { - queues <<= 8; + for (i = 0; i < IGB_NUM_VM_POOLS; i++) { + if ((queues & BIT(i)) && + (core->mac[VMOLR0 + i] & E1000_VMOLR_RSSE)) { + queues |= BIT(i + IGB_NUM_VM_POOLS); + queues &= ~BIT(i); + } + } } } } else {