From patchwork Wed Feb 1 11:17:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriram Yagnaraman X-Patchwork-Id: 13124162 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 4B8A7C05027 for ; Wed, 1 Feb 2023 11:19:05 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNB7T-0003jU-VW; Wed, 01 Feb 2023 06:17:40 -0500 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 1pNB7R-0003iQ-VQ for qemu-devel@nongnu.org; Wed, 01 Feb 2023 06:17:37 -0500 Received: from mail-vi1eur04on0727.outbound.protection.outlook.com ([2a01:111:f400:fe0e::727] helo=EUR04-VI1-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 1pNB7Q-00059m-Ij for qemu-devel@nongnu.org; Wed, 01 Feb 2023 06:17:37 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OU0vX+vOk0l1xfxTo3iXzXyZIikH3V2BIbz9cNpTVCpESmd9HeO5bNkCFbZRVKlthO3umC8IyrgojEhXRDe3lqpMTuyvPrMTMoycnf2q1XlRKMBDmrEXPjdCjKN9YlnM/1xQQaKbH5K3quyp1L0FmhdqL5GPptAGuRlxlKvyiRG0tZ/sBvb4lGgERoIQ+o1a5W/2Ag1ByaNRz3wZ3tr8saRvwEiivnFyATxYsWdXosdadK6Ua/v1kXTvw+ie7ETfLNiNntT1SJo/JqxlphGO5wKX82hagcI8Xhld2yZ5RbFSVKTwdKD75vdW97edhPFAaw2DukGye3K6izdsXhy6Sw== 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=j9Abq45938CGnKEaQArxmSlaen8sO/agH+n/BVwCof0=; b=ifo8Q/AGpXY91vS2WEXZT3ueaZnqK8+txz/9aQpRNw7lt4cQx6oVAViA1z5A9xJaETJawTMwlF2REMZmXYSFN+14db6pdS6TlZEvLLWBKqDtpQcnvaUBacvGWctklkRwba0VG6qCRyfYSIiDUe9u7GIGc9YwJsRYb4u0F97L4+TO92mwSUb6M4fmILAAJL8zsYu94yR9RSwGuYq7Vf6CVawJXcvoMied9P+MbEzPocSHgs+5T132p6RBYspiVIwyMVs9zmxgWBD/s05dViZWacZi/NhKbXBmtNCUfXYhH4KOhvbyuujGOoXmPaIfLZFhMYvTl23yEkomzy19o03XPQ== 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=j9Abq45938CGnKEaQArxmSlaen8sO/agH+n/BVwCof0=; b=J1btDN90QZW2chnMJxIqE9OqCompDvYIo27R1/CpGFXpKtMHmOZmMuonjsOgW7smElQQQkoN2e74FrECLUORnNiUg8KrT88qlzlKPOUCfAOxBi80e0HUvCvv0c5JWz6h6ZJ1lM6k0dIeQGyeEGQgf+Mgj6UI6RwJPTJqfpvNSmE= 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 DB5P189MB2551.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:489::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.38; Wed, 1 Feb 2023 11:17:25 +0000 Received: from DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::8f70:435b:ab64:9420]) by DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::8f70:435b:ab64:9420%8]) with mapi id 15.20.6043.038; Wed, 1 Feb 2023 11:17:25 +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 v4 1/9] MAINTAINERS: Add Sriram Yagnaraman as a igb reviewer Date: Wed, 1 Feb 2023 12:17:14 +0100 Message-Id: <20230201111722.28748-2-sriram.yagnaraman@est.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230201111722.28748-1-sriram.yagnaraman@est.tech> References: <20230201111722.28748-1-sriram.yagnaraman@est.tech> X-ClientProxiedBy: GVYP280CA0014.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:fa::8) To DBBP189MB1433.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:1e7::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DBBP189MB1433:EE_|DB5P189MB2551:EE_ X-MS-Office365-Filtering-Correlation-Id: e5138ddf-82e7-4e7c-4d5e-08db0445e548 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jj4kjGtNaaIpw8/FLj55BlMVEl9gbtL8Q2V56BqtBPqk7RcoTXoDouvbyS/gcvy3F/n21JDLGxMFj/LKg42kG53BtLkEHiuPPHl2vC2xgPpImCA+rXhPwnBQ/zRYYJbyXbiQlYdiVyNgEXuh8rAAnj15oGlzy9iVN0w6xDVeWSwSvOt9Z/RY9iUCpD6xnQ+vo71HSHzw3E36mQmJa7tgstvY5wn3AGQ4+WR9Sy5hWcXJGO6lbhVKwpp18LsfPJ3SREcLWn2HOCTcGvwkBkUOMt3FRgJpqbWyYtvCzhN2El1y5vqerYZOrEqKA2XrP+grrhFFrtP3jBWfMc7WCVdRDbnrNrgTsIk6P/bsJHpXwQ0c1fcKFaQnqascHzkYPOw59slvcevPpi68yL2dw+jsvYz1yZ1a6CJAjJ4qohKI3w+9Ek+YPfuAgMfWp6QX537P+aKNu4nsrPcRd0NI3ozHyse+tI/m90eIx3/3pYOzzOAHlB9PrWRHFF3g81TIfaWH2tAMO14jql9rqJPomU221SyWgRIQH615aFTZ1QwzLfk7PCDE2yuHse9KGzfLdYKGgGphXCf4oAkUqrbT1lKKJlcaEZz3SY1YGaurpDnWzElt339k0KGheCIaP3HjUoWBzQbcaKMx6ZlpQpUnZ1A8louhRuxNg2zLI+zm9fZ7G1kDTD9BJ43zpD/Ubwd/Z5xKL5bI0E6QJOHAwwQRFYFbreihLuuDXudnodxKEU++ZPo= 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)(376002)(346002)(396003)(136003)(109986016)(451199018)(36756003)(2616005)(6666004)(6486002)(478600001)(2906002)(86362001)(38100700002)(8936002)(54906003)(1076003)(6506007)(66556008)(8676002)(5660300002)(316002)(4744005)(41300700001)(44832011)(66476007)(66946007)(70586007)(4326008)(26005)(6512007)(186003)(266003)(37730700002); DIR:OUT; SFP:1102; X-MS-Exchange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rt9QlRikZVWEfZ1s9lg9yUUrmEBGO3lSFcnu5cimgJ27xDpALE+63td1oGMIN6DNpBIUaKteJocgaVMuYhwUr6SC4H3bjuVlLyHHch6UkNUrCkiFe9dcUOfi/CkDLHMfiN4SwIXeJtt+mYUS2TUB3DwHd4xyC1j1YzDvhQNH0Q49ptwBIQZ3KRUHp9lbT1ttFFR878/b9oSh0okDLSNa/oujv3wS7G3/umtTRwQc4OevDgWawtRdjPyoh+x8Y71YFgP/J/ZFUUDWqiYArRlVmUezjDqFrg57Cwc/bvlLNcLEFmq/xaMaW13zirbA2lZBUONs4XqDIpmLK9p25+hD6ZqmWP4mjGiDqR7zF0PBy7GJTGJsjTWBkebHZp/5B3SGNY7PKnBX35bMHklU9XULmCYTEYZiVxOZbM2n3INdPbXD9x9NPFfeF5zfOplYj6C2wOyWl7TsrVoSKLoI8Mb3vWg2l78Qdkm7lohYqBH1Yvbf9UMy8j9oZfT/C+y8XktinlCFpFKzvyMstsn01soSvl0xlI9qFr/bSrw5U6ve2qa3fowTs+2S5WCDv9ABDD1t+HGsGDF29qPMg== X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-Network-Message-Id: e5138ddf-82e7-4e7c-4d5e-08db0445e548 X-MS-Exchange-CrossTenant-AuthSource: DBBP189MB1433.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2023 11:17:25.0126 (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: 0nd6MFaS+z2ZKvu12gFzPmSO2arndoeXV2dM7odcAwBtO+oQRg2s07w4ZWmbSIFcBnzMVr6lqlH/FdxmWXYBWRxvr6BXhJIUXlB1G+T96is= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5P189MB2551 Received-SPF: pass client-ip=2a01:111:f400:fe0e::727; envelope-from=sriram.yagnaraman@est.tech; helo=EUR04-VI1-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 I would like to review and be informed on changes to igb device Signed-off-by: Sriram Yagnaraman --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index ece23b2b15..7d0e84ce37 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2224,6 +2224,7 @@ F: tests/qtest/libqos/e1000e.* igb M: Akihiko Odaki +R: Sriram Yagnaraman S: Maintained F: docs/system/devices/igb.rst F: hw/net/igb* From patchwork Wed Feb 1 11:17:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriram Yagnaraman X-Patchwork-Id: 13124698 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 DDEC5C38142 for ; Wed, 1 Feb 2023 16:28:39 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNFxq-0003DW-3Z; Wed, 01 Feb 2023 11:28:02 -0500 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 1pNFxl-000391-3V for qemu-devel@nongnu.org; Wed, 01 Feb 2023 11:27:57 -0500 Received: from mail-am0eur02on20704.outbound.protection.outlook.com ([2a01:111:f400:fe13::704] helo=EUR02-AM0-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 1pNFxj-0003K3-Kz for qemu-devel@nongnu.org; Wed, 01 Feb 2023 11:27:56 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NthhalZFYjp6w4A8hA3Hau32Z9KLzOBrbvkX8Yt+agtfQO9g8VY9XAF00MLh3N4BO09IGjylGzdv3GDDq8G1gAL1cyqiO+gp6dbwU1udBaVkLr9vttEwI1B2qVicOJEsGgMjkIIaPcY47JGyDN0ENDnOVyGD46mYBaJjwQHeGsIv3oYjgWM8JTaR2xIi90E2l3/CsizBh3odNjW2LQDyyhDkMIqZ+1brbWNw/7kRPniJd5SoWrE2feAYOQ5PLfZQ1wVK4xISRXOdE0GRilUn445JAdmu/hIfX41/fQiqgQIF4R84h8h+oyNyLiGwDlDMAexM+n9O2ov0dUtdXWw6iQ== 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=cH8eb0Ku50eAOzZOrdXz9GiXP/+yYlyCWgiOKa//Xlw=; b=KidcZNR64hyrF2iX+oUMInLqnhMfMXvhJSYl7TqAZgUGnY3u4pfObeVdLkHSb0g/jdIjH12AA+rxBs2B1Ho4BCSUb8UK71cL/vQPitIzPmT8aEYy/H3TdcM4wyMWB72Xb5DixRk1SkX62zao+dH8ZwHXa+CzUlMbZE6JzigEoM2a/Cp3kye2EzeHNmVb4j8tFECcjJXhTyPmgt9OnhajIfqlJv3dSbatnuKYggygCCi6VDjBqrw96PoYnduxB8L26yEod2erUObN+9fbogy8YLKTqbqiMP5fbRhEObTTlcuw1SXVOsi5iz7eqrk6DBqS8mRNd284bHyXskAvwLgmGQ== 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=cH8eb0Ku50eAOzZOrdXz9GiXP/+yYlyCWgiOKa//Xlw=; b=K8K3TotyouZTT1FUKEbTV77hFpN2Qon6/JvMc9Fhp9myKiBHaUTTC/yb2Dvf36fSTTLOfBuc5ZxW2s3Cza02O6aaEv2RtRtH64Nlmc1+LnNvH9RGWjUOTBmdIM2EyVmIBWVkTIPjYPSdv5X6xfRrmkIlMpnsk4PG7wLjYg9J8/o= 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 AM7P189MB0836.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:17a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.24; Wed, 1 Feb 2023 16:27:49 +0000 Received: from DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::8f70:435b:ab64:9420]) by DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::8f70:435b:ab64:9420%8]) with mapi id 15.20.6043.038; Wed, 1 Feb 2023 16:27: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 v4 2/9] igb: handle PF/VF reset properly Date: Wed, 1 Feb 2023 12:17:15 +0100 Message-Id: <20230201111722.28748-3-sriram.yagnaraman@est.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230201111722.28748-1-sriram.yagnaraman@est.tech> References: <20230201111722.28748-1-sriram.yagnaraman@est.tech> X-ClientProxiedBy: GV2PEPF00000103.SWEP280.PROD.OUTLOOK.COM (2603:10a6:144:1:0:1:0:1d) To DBBP189MB1433.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:1e7::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DBBP189MB1433:EE_|AM7P189MB0836:EE_ X-MS-Office365-Filtering-Correlation-Id: 7a638cd8-e6a9-4c4a-1df6-08db04714215 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TgaIkwPDo5zqvvWksCXgI2NvnRfo6MBeyAjvGEiib5+ZzKaF59GJdoYYQziyGgLWK4tocwr554jAsKMTySIMKFxm8pAi4PjSwHaVikukB1QTTCq1aHRnExov6SZXpv3InLUceV+xw/Cq3u48DW57i5T/o/nUP2/riGT/JIqtZ/ffBw0g9PjKzWe09E9cF2/EQGMqe8XB5WOHsIACjws+f24FkmEYzsmVJOfYRDv9gaFws8JjGTDxrwYF/KDYjW5ksFeJhmC37OELlEd5xX0Q0ldc88CwwC7RymmnhH6nxCCFkUGWh0FVeoN+eERIK8ryHwAUKZ+uCktD3ABjnMd2EHcPYNR1yUz1PwhRZHC+39HbbtTEL4813/x8E/9ldGdy/7yV6iYbRCvYGmQkw0RSA3YloHQJSJsCP1J2jic/y3tXT+GZ1KsIhcV/grjls7Zc/NsChPgMK4IUzNKXwuqm68CbXXOw6NoM5EtGSY1MzQrr5nnNNPExeMAof492KwF1oYHU32m0+t3onEPuY3nOp4WnNLpdVnAsrTGGOJSz5X/dE5y/HQiQsxhY3KRRN1tnzOHgUCLfChzaaA5w7SrsHrXwENIArpA+Ie4HUnNLuc9AsfUOa0vDRejpeEsaaYHvn+uX8zeKilmE3vzoOr2DC7YIciizBSbCS7DtwwBOjlHmMimjZGJiV4dIT6E0pNIiU1G9hOG51YS1eRBROa3bK364jtpuH8VWoy9C34B8pz8= 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)(396003)(136003)(346002)(376002)(39840400004)(451199018)(109986016)(316002)(6486002)(86362001)(478600001)(2616005)(38100700002)(6666004)(1076003)(6512007)(186003)(6506007)(26005)(54906003)(5660300002)(36756003)(83380400001)(2906002)(66476007)(66556008)(41300700001)(8676002)(8936002)(44832011)(4326008)(70586007)(66946007)(266003)(37730700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mkbcF/yWDQGE8kFOfSfjdeIFlJI0q2iuS+uGSC75aqxXI93KaqX+96dn/C1RQ7G21jaXp4whGMI6WzfdWD5uw+tRF7e/+ptaVzdz36jRChcKhpU7fH3S92FRCpXYg+GdPCUKP3k4l5QNSZbvsJTZ3eiQeLal4lHhR99PTVbNPnPmlD8kX7uBG/yfChwT/rqYz445fmXGsUqBsdh+7a3SOxOBEvkd4M40rRdWUElvE0m1lrGvhu3Jz2gSay6FKAV/tVzQ3pfVoYTOkjXXXZYznv79G/IhCILnj34f/tbX3WnNsp5YnBoh7pLoqy9Uu8PYULTeBUJgks5H/Dv+QHsGR4/MvJvQN14VqJx48nxXKx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qj9qRiTV3x7L3TIkcsV2kO1OX06rWJ0LeJ298EPpkemYt4zddBGaVAwFFZZpVsHzsOBzIh3DxFyPjklWQ29nhEhVUH2ToSPqCpzP5F0fFD3aszy2sASbNuLkGBJYY8wQFwhmhrxZCvpdE9Y4l3aq2L3k8tlWbls1YlU0Wqx4MYa2LD0LYYeszw== X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-Network-Message-Id: 7a638cd8-e6a9-4c4a-1df6-08db04714215 X-MS-Exchange-CrossTenant-AuthSource: DBBP189MB1433.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2023 16:27:49.7364 (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: pe/ua0pZpQIdq9o6UGcngZXrsrgSKi/QK0yXpgaRicrTr+OaGSr0X3IgnvJ6gzRkwXVYu971Vo6ARcOXAyHC9OfpVotdjaz/qFsKdGMYrTI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7P189MB0836 Received-SPF: pass client-ip=2a01:111:f400:fe13::704; envelope-from=sriram.yagnaraman@est.tech; helo=EUR02-AM0-obe.outbound.protection.outlook.com X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_03_06=1.592, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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 Use PFRSTD to reset RSTI bit for VFs, and raise VFLRE interrupt when VF is reset. Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 33 +++++++++++++++++++++------------ hw/net/igb_regs.h | 3 +++ hw/net/trace-events | 2 ++ 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index cb3e2d0be3..b484e6ac30 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -1887,14 +1887,6 @@ static void igb_set_eims(IGBCore *core, int index, uint32_t val) igb_update_interrupt_state(core); } -static void igb_vf_reset(IGBCore *core, uint16_t vfn) -{ - /* TODO: Reset of the queue enable and the interrupt registers of the VF. */ - - core->mac[V2PMAILBOX0 + vfn] &= ~E1000_V2PMAILBOX_RSTI; - core->mac[V2PMAILBOX0 + vfn] = E1000_V2PMAILBOX_RSTD; -} - static void mailbox_interrupt_to_vf(IGBCore *core, uint16_t vfn) { uint32_t ent = core->mac[VTIVAR_MISC + vfn]; @@ -1972,6 +1964,17 @@ static void igb_set_vfmailbox(IGBCore *core, int index, uint32_t val) } } +static void igb_vf_reset(IGBCore *core, uint16_t vfn) +{ + /* disable Rx and Tx for the VF*/ + core->mac[VFTE] &= ~BIT(vfn); + core->mac[VFRE] &= ~BIT(vfn); + /* indicate VF reset to PF */ + core->mac[VFLRE] |= BIT(vfn); + /* VFLRE and mailbox use the same interrupt cause */ + mailbox_interrupt_to_pf(core); +} + static void igb_w1c(IGBCore *core, int index, uint32_t val) { core->mac[index] &= ~val; @@ -2226,14 +2229,20 @@ igb_set_status(IGBCore *core, int index, uint32_t val) static void igb_set_ctrlext(IGBCore *core, int index, uint32_t val) { - trace_e1000e_link_set_ext_params(!!(val & E1000_CTRL_EXT_ASDCHK), - !!(val & E1000_CTRL_EXT_SPD_BYPS)); - - /* TODO: PFRSTD */ + trace_igb_link_set_ext_params(!!(val & E1000_CTRL_EXT_ASDCHK), + !!(val & E1000_CTRL_EXT_SPD_BYPS), + !!(val & E1000_CTRL_EXT_PFRSTD)); /* Zero self-clearing bits */ val &= ~(E1000_CTRL_EXT_ASDCHK | E1000_CTRL_EXT_EE_RST); core->mac[CTRL_EXT] = val; + + if (core->mac[CTRL_EXT] & E1000_CTRL_EXT_PFRSTD) { + for (int vfn = 0; vfn < IGB_MAX_VF_FUNCTIONS; vfn++) { + core->mac[V2PMAILBOX0 + vfn] &= ~E1000_V2PMAILBOX_RSTI; + core->mac[V2PMAILBOX0 + vfn] |= E1000_V2PMAILBOX_RSTD; + } + } } static void diff --git a/hw/net/igb_regs.h b/hw/net/igb_regs.h index ebf3e95023..ddc0f931d6 100644 --- a/hw/net/igb_regs.h +++ b/hw/net/igb_regs.h @@ -240,6 +240,9 @@ union e1000_adv_rx_desc { /* from igb/e1000_defines.h */ +/* Physical Func Reset Done Indication */ +#define E1000_CTRL_EXT_PFRSTD 0x00004000 + #define E1000_IVAR_VALID 0x80 #define E1000_GPIE_NSICR 0x00000001 #define E1000_GPIE_MSIX_MODE 0x00000010 diff --git a/hw/net/trace-events b/hw/net/trace-events index 0092919b9b..5665cccc1f 100644 --- a/hw/net/trace-events +++ b/hw/net/trace-events @@ -280,6 +280,8 @@ igb_core_mdic_read_unhandled(uint32_t addr) "MDIC READ: PHY[%u] UNHANDLED" igb_core_mdic_write(uint32_t addr, uint32_t data) "MDIC WRITE: PHY[%u] = 0x%x" igb_core_mdic_write_unhandled(uint32_t addr) "MDIC WRITE: PHY[%u] UNHANDLED" +igb_link_set_ext_params(bool asd_check, bool speed_select_bypass, bool pfrstd) "Set extended link params: ASD check: %d, Speed select bypass: %d, PF reset done: %d" + igb_rx_desc_buff_size(uint32_t b) "buffer size: %u" igb_rx_desc_buff_write(uint64_t addr, uint16_t offset, const void* source, uint32_t len) "addr: 0x%"PRIx64", offset: %u, from: %p, length: %u" From patchwork Wed Feb 1 11:17:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriram Yagnaraman X-Patchwork-Id: 13124697 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 A64C4C64EC4 for ; Wed, 1 Feb 2023 16:28:36 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNFxl-0003BX-Vj; Wed, 01 Feb 2023 11:27:58 -0500 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 1pNFxj-00038a-Cs for qemu-devel@nongnu.org; Wed, 01 Feb 2023 11:27:56 -0500 Received: from mail-am0eur02on20704.outbound.protection.outlook.com ([2a01:111:f400:fe13::704] helo=EUR02-AM0-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 1pNFxh-0003K3-Ht for qemu-devel@nongnu.org; Wed, 01 Feb 2023 11:27:55 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dlKhbvtksirvCIxkP6SW6XsVU0JIt3Pbd0ZjWViOmiiWI/yQw4linAtf9U1ZF1OYoVQwAH1XOx/bzkoFyMKcOxEejDnTG3bjW06NrJywPY+jCbNbrFM4N4fQCsQYvbAodHv2qZITSvShC4uujyWCthC4IYLD52s16o8IlKdy6LGfUrAXNQlGkTgu3gIuKOcSlY0PxapIAd9n95i9dgxN1jHW77tEFaSEQ5ABDbl1y730mr/3Vj+h5Qwvdgesuxjg8z7YPTy4Hu+qrFBvTjF74wJpq46Q0a+WSM1DVflwgojHlANq0y1zZaGpZIrlw0SaZ4GFhjReC6Dct3OZux74ng== 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=ml7PYWUwcO9OgfgeE8wjUWxpwkyeQMPKGixdTVNt8zo=; b=GG80B5U1nDrc8CjiCXw4IMT/oZXtu6vCzCYYh7DGT2fhYq3s1ZWykyItb433xIfe89r4VYXFMrVFWRt64yfFFRYyhKwNFcg2PVOVLGuod46q3rKto2l5EP4DR7fJY7vZ7NQTH8IPOIHUQOITdu1QpXezlhhvrT3uGQnkIQPSrSKBrkMMWxpouu2qK2QAit2GihZpZZBSu5sxrZKbL4MmVIxaMDHImn41ehjFvHXAFhstpoAABfU7X/Cge9n9pn/0+RO300TcsFjg86D1R9K0rOdXyX2P4MnV4R/I6IhT99k7BODbp9teYKqK0GaW0iin9UcyDEZPDm7AoIkCa9m3Ag== 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=ml7PYWUwcO9OgfgeE8wjUWxpwkyeQMPKGixdTVNt8zo=; b=RP9ZicsBznlqPlkiSmriGpI6oAcBs/vyy82T+F0gzdWaX3CRQP2wdmbLcpHQxDF+LXYJy0Qv/8O9iM2PBMVCWVg2u3P5c3b8/wwTUcGNHH7oFt0vvtxT2F9EvMbx6YRrzHTOLv6AAzBGL76n/ehoAsFKqa6e4JfMh9GZJ4sdlzU= 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 AM7P189MB0836.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:17a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.24; Wed, 1 Feb 2023 16:27:48 +0000 Received: from DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::8f70:435b:ab64:9420]) by DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::8f70:435b:ab64:9420%8]) with mapi id 15.20.6043.038; Wed, 1 Feb 2023 16:27:48 +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 v4 3/9] igb: add ICR_RXDW Date: Wed, 1 Feb 2023 12:17:16 +0100 Message-Id: <20230201111722.28748-4-sriram.yagnaraman@est.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230201111722.28748-1-sriram.yagnaraman@est.tech> References: <20230201111722.28748-1-sriram.yagnaraman@est.tech> X-ClientProxiedBy: GV2PEPF00000103.SWEP280.PROD.OUTLOOK.COM (2603:10a6:144:1:0:1:0:1d) To DBBP189MB1433.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:1e7::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DBBP189MB1433:EE_|AM7P189MB0836:EE_ X-MS-Office365-Filtering-Correlation-Id: 9b955247-381a-4f97-4a1a-08db047141b8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SF+Vg6teluPtOqye29lDnpF80wgakI1gf4X6oIAFos+dbQJUt05Xxp4EXY6HO5J+BztW5XgUACg+T2D/Snslp/Cf5qso0MGAKp8MW0cFbNGfWTXILqLljclnqbhAYBQ/5hFBWhQPZMJ3ACrpHDAUzsSJQ8AKLt1jSsti3s4KC5JSKuE61TsWcb8qXe/sHVxtKriFRTuMXdF3xG1WxwlaZx2IdV5LHy+7UMOY+yIzqAuTDsuwKwhY3yMu3b4XvObqsoOYMVvOBFUqXhaNX3+qX8/UXP/kOmrosKNKJn5A5Q9C2TcfMCMLCNpZVDujZTq2cY/JIwdB/dok8SwJsFm3sIwPN9XGK4X39WLjoV2T1RzHCgbWQ9bEkPMQwTg1sO/jRd4MagfAQxEEyqgujjD/lypYHyyLxl93vIXeHCdW0CmT02x2k+9Coln24ouhmgbJjFiu3b4JzLB7JPdvD70r7MGqrdHopM/5FJcP78yr2SnKC+jzO/iIHZd2q7Ydz3VbWSoAeY29ByZTKAhlBpfmcJ3qbV7BWmxeq/QyjkcvT8RG3QiectyvnJ2QUABQ/fZ8zH6wt0h3kwXZnY0Huxv+6n++iCy4g3mLtJUuA9xJBcnSKPnlnT2kJDKQB8cixbhDd5sqDtOxXIltQbUOcHUAvsa7TMau8TiKoNGsIfJXcvknLR8+bjVWGcK8FtosquLEe7OfLZMDmHrxlOQCkUYPe7zejYaFyId4bVi8xzw1C4M= 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)(396003)(136003)(346002)(376002)(39840400004)(451199018)(109986016)(316002)(6486002)(86362001)(478600001)(2616005)(38100700002)(6666004)(1076003)(6512007)(186003)(6506007)(26005)(54906003)(5660300002)(36756003)(83380400001)(2906002)(66476007)(66556008)(41300700001)(8676002)(8936002)(44832011)(4326008)(70586007)(66946007)(266003)(37730700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-Message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9qJdsK/KqZQbSk4WVIUvl1kEGZ83ls2Da3d7hhxKrNeSDC3g6VE4hG9sZOEnYifs1poTR2eNm0vmy1FTL8Z8jfijwPvv6PxPvMM68Slp/DGccGcNRU/fVobBErb/fjZOJMDbAQ5UxgU/0lkqsF0xKtm2X4fSIuplQzb+FJfWjbeFsJJ5CDncBDhfPS9DnWhinP5c7/wTC7ahFUFRIAsj082njrhJzqmEKKcLjp5g20OicuGSaDSAjiXhzKuQRpkYP/nFQaDTE2gM6mKVLWaY0OtsMR9g0XtpkUrKO1+B/AHumHjGBh2PB5faTLyu1JmJJBHCYUN4Zlu8BGHqULKObOyB7zvYr9YP5+jd7Tip8pODIwmCsYGupXoJRd5eLuBIZedtQgb3CJoo8fNza0iwQTfZmkZ4vKWjJcs+tyM4SApA3yWwl47zcW1U0EAQNVl5ILPqZ/uOPpQXELBvDqKfmVkJNrE817hD+5yOToDQ92pkHQQq+8Z6n9Y52GjTWAJY6mDteodjfAqJ0imbP/jWTy0rQUY+Mmhe5ucfdEiREquyA== X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-Network-Message-Id: 9b955247-381a-4f97-4a1a-08db047141b8 X-MS-Exchange-CrossTenant-AuthSource: DBBP189MB1433.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2023 16:27:48.5187 (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: Itm9FPYj7uqGE2Z/YIgZGuU3GRbocxjGpRzpN7bPwJCJFm7wlky1lavAExLT2p0UN5fZo5kmCe0k33KNHB4Bv4Fa6JGYgOaNXV2D/ZK8LrE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7P189MB0836 Received-SPF: pass client-ip=2a01:111:f400:fe13::704; envelope-from=sriram.yagnaraman@est.tech; helo=EUR02-AM0-obe.outbound.protection.outlook.com X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_03_06=1.592, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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 IGB uses RXDW ICR bit to indicate that rx descriptor has been written back. This is the same as RXT0 bit in older HW. Signed-off-by: Sriram Yagnaraman --- hw/net/e1000x_regs.h | 4 ++++ hw/net/igb_core.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/net/e1000x_regs.h b/hw/net/e1000x_regs.h index fb5b861135..f509db73a7 100644 --- a/hw/net/e1000x_regs.h +++ b/hw/net/e1000x_regs.h @@ -335,6 +335,7 @@ #define E1000_ICR_RXDMT0 0x00000010 /* rx desc min. threshold (0) */ #define E1000_ICR_RXO 0x00000040 /* rx overrun */ #define E1000_ICR_RXT0 0x00000080 /* rx timer intr (ring 0) */ +#define E1000_ICR_RXDW 0x00000080 /* rx desc written back */ #define E1000_ICR_MDAC 0x00000200 /* MDIO access complete */ #define E1000_ICR_RXCFG 0x00000400 /* RX /c/ ordered set */ #define E1000_ICR_GPI_EN0 0x00000800 /* GP Int 0 */ @@ -378,6 +379,7 @@ #define E1000_ICS_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */ #define E1000_ICS_RXO E1000_ICR_RXO /* rx overrun */ #define E1000_ICS_RXT0 E1000_ICR_RXT0 /* rx timer intr */ +#define E1000_ICS_RXDW E1000_ICR_RXDW /* rx desc written back */ #define E1000_ICS_MDAC E1000_ICR_MDAC /* MDIO access complete */ #define E1000_ICS_RXCFG E1000_ICR_RXCFG /* RX /c/ ordered set */ #define E1000_ICS_GPI_EN0 E1000_ICR_GPI_EN0 /* GP Int 0 */ @@ -407,6 +409,7 @@ #define E1000_IMS_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */ #define E1000_IMS_RXO E1000_ICR_RXO /* rx overrun */ #define E1000_IMS_RXT0 E1000_ICR_RXT0 /* rx timer intr */ +#define E1000_IMS_RXDW E1000_ICR_RXDW /* rx desc written back */ #define E1000_IMS_MDAC E1000_ICR_MDAC /* MDIO access complete */ #define E1000_IMS_RXCFG E1000_ICR_RXCFG /* RX /c/ ordered set */ #define E1000_IMS_GPI_EN0 E1000_ICR_GPI_EN0 /* GP Int 0 */ @@ -441,6 +444,7 @@ #define E1000_IMC_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */ #define E1000_IMC_RXO E1000_ICR_RXO /* rx overrun */ #define E1000_IMC_RXT0 E1000_ICR_RXT0 /* rx timer intr */ +#define E1000_IMC_RXDW E1000_ICR_RXDW /* rx desc written back */ #define E1000_IMC_MDAC E1000_ICR_MDAC /* MDIO access complete */ #define E1000_IMC_RXCFG E1000_ICR_RXCFG /* RX /c/ ordered set */ #define E1000_IMC_GPI_EN0 E1000_ICR_GPI_EN0 /* GP Int 0 */ diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index b484e6ac30..1ddf54f630 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -1582,7 +1582,7 @@ igb_receive_internal(IGBCore *core, const struct iovec *iov, int iovcnt, n |= E1000_ICS_RXDMT0; } - n |= E1000_ICR_RXT0; + n |= E1000_ICR_RXDW; trace_e1000e_rx_written_to_guest(rxr.i->idx); } From patchwork Wed Feb 1 11:17:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriram Yagnaraman X-Patchwork-Id: 13124159 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 CE47CC05027 for ; Wed, 1 Feb 2023 11:18:45 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNB7R-0003iP-Q9; Wed, 01 Feb 2023 06:17:37 -0500 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 1pNB7Q-0003hn-6h for qemu-devel@nongnu.org; Wed, 01 Feb 2023 06:17:36 -0500 Received: from mail-vi1eur04on0727.outbound.protection.outlook.com ([2a01:111:f400:fe0e::727] helo=EUR04-VI1-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 1pNB7N-00059m-RC for qemu-devel@nongnu.org; Wed, 01 Feb 2023 06:17:35 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iFT64qFc6G+uI4C2HT16XnZk1FmG/l5NmwYdoX1YWf5AQ1wpF++bZjaXxW8mqGW5smII1KQOAzrLLSs2IxiJ+vuyFIAWPZtziUspeYm5qdbtwuco4Uda6cxsHzB7FUS3BoGpCY363qvIzOZ4PLoeN2G2hq9vo0WML5gf7XBLe4KT7xNgPtFqKQAzethoSnDTDkllUCyfAtlpxir0CFNfy+l/yKSffaLkX1dbhpIyhWS1e4eNMu28Kkmndsg7YzZC8eV1iNWbT9ux3KYD55VZ5Sw+sh09mDMA2WXHKodqCXUIw9ISY9Mw9c48tvt4RJEdUVW2y9gZYJYDGl+h/gYo9w== 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=+41KNgkWG5n+HRPdp39N8FrPuf83zWFNOXt7ItN+sBA=; b=AeHwtnz+Oo+TaLs9WHGiZIBTN620KD/sTOY/BSZpZNcpfKNhD2YotQgFuo1vBB23J77We0BKWrPAaXsLFH2gINgOIduGO6fZTczzbTKDZFJ0WQ4Z1thTlPrgg7j4AIXgyaCyDx/K4TQ4jfN14KN7FSuPVdj7Kpu+mJIyhZB6hACgvfLs6hD8uCFHKsnJ79YLbKGFEoBQo10vaXtP65/Mr/+/IXF5Ai8RCJlKXlPOyMiswJJWtDf6Yg1U21eRF6gVrI8sodWGVikjJe+nWYUk7rzCOb6OX1+pc4K9cZn1Ox64g4XUEs4FTmQh+8Z4ofPdX2dCzADbex3TLIYt62EOqQ== 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=+41KNgkWG5n+HRPdp39N8FrPuf83zWFNOXt7ItN+sBA=; b=I81JtVXdvtVvGFkAJv3kvKsv7U29oDD1t4NJnbX1pwJXWQ/M1N53CXFraN/Sxf+z8MCxn1LLbJzP/9mPxDuVsGWcH1Nc8e3hqDjuF+sLkvxjQ4Qi3zS8w5nKDNTKBkVcVZNDp+2FMF8hPRpykr7OF/8Y41Twx4By/x5QoNC7TXs= 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 DB5P189MB2551.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:489::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.38; Wed, 1 Feb 2023 11:17:25 +0000 Received: from DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::8f70:435b:ab64:9420]) by DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::8f70:435b:ab64:9420%8]) with mapi id 15.20.6043.038; Wed, 1 Feb 2023 11:17:25 +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 v4 4/9] igb: implement VFRE and VFTE registers Date: Wed, 1 Feb 2023 12:17:17 +0100 Message-Id: <20230201111722.28748-5-sriram.yagnaraman@est.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230201111722.28748-1-sriram.yagnaraman@est.tech> References: <20230201111722.28748-1-sriram.yagnaraman@est.tech> X-ClientProxiedBy: GVYP280CA0024.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:fa::12) To DBBP189MB1433.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:1e7::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DBBP189MB1433:EE_|DB5P189MB2551:EE_ X-MS-Office365-Filtering-Correlation-Id: ef9ddd4c-5c3b-4180-af53-08db0445e54a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wQbjZzLGY+s4qbahGtKHTFpPCr11uy5W5ahCZPLAxgdp8mvDJEG0GNvKGYhMMyHMxUHRdC8pt9y36HSil1VEyo+wz2qjyWxNy2TYQPQH4HrbESqzlbMwtvJPjXE2Ow3hhup+QRHGqRNhSvIRiFZE1C3C7XbntEuvmIleKW/mkCGb1rdzqnDAjGsa4C23e90Vub/HCP4fKsD3nAoDcH8MVdFJyWyUGJKK9JYLb3UUvEdveejnXulNUFcMW5F2ZugoTzJiEOZ5d8YNliVWuxyXmNhNb1RaJaV7SgJ31AcCBcn2b1vxe+fPx+I8ucDViQ0iqIgEV7wY712XMIdRvmzVeOpt7oDLvmwws0j9GJWrMPuXLWGFNVxWyI9pU5QMcHnFQ7s2u9Ftq5r2HVWzD354qoOCB8JPjQGSuqZmfwipmaOMQCEKH+nhVKm5F6Wr6K3p6W8VtS5jp4OSiF0QnTSHlLBbR8Ju+NvNqwK8qVituPzL0Jm+uIFBE57Q8ljGiF43QjGzvGvNGedtmjgld7n1p6OPkGCcojcMfQmdWmlc9Uv6Obx6z4pwcGVG1EpwwDQ+OJ4UJCoeY5Tiql5PbDNAZs28eR9lMabKysZaG9FK6+QbD4MgjQrAcwJIXVc8iXmd2V6yek650d4vE8uchrNZW8coAgB8aoFM0TjTV9eX4ZNbGuKJ9Sa98XHGYc0jj8zBGZ33xa2qcrfWfoDq3DkvU98S1eau/AEXZcqSJK77J9g= 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)(376002)(346002)(396003)(136003)(109986016)(451199018)(36756003)(2616005)(6666004)(6486002)(478600001)(2906002)(86362001)(38100700002)(8936002)(54906003)(1076003)(6506007)(66556008)(8676002)(5660300002)(316002)(41300700001)(44832011)(66476007)(66946007)(70586007)(4326008)(26005)(6512007)(186003)(83380400001)(266003)(37730700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Wy+pgO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wailnuxlGm35Y6jLQIcK9GhE06nv5iSu32CWPNnQKC27gXd2l7KqtfrOmCK9jueYuAIoNta6WDS4FxYPpoPRmTX2gIUTgqHk/WfNQwERDnhIpzm/1aIQ6EaUhfXxOQEX1zNQdOWj6d82zNtRHbwcLGdXJOERWzA09uTq4MuMzpQoWLctXssmkZkIFMWLpvbQ9fYdqVY6I0Wd99ZXhf5nBmgEm4dMoy7IBqXnzYQKZ3PqKQ/ENdR9EfT9T5CkGEh/ryyjudcsraEj42mm9Cj9haAxHzfv9OMesnEWNaDo/CHx0zmeK1F6iQf6izfpdNnDXliekxviTl7AI92/2fjk34wAu4kJP0TPdZnp6hXNOd1P7P6oo1IfVUUu5wEc4PP2v78GyjtDRM1rQ5tWnEJ3vOPRlhn3ERAGdnGbqkWIyxQ2vV9R/qv2eLDHH1n15JuLvLEZMSHy21gNIfiooDvYZnOxBjCW5l3LFIbsYMuPYU4oXfsoEnnpdm/BQVd6vU05Fa9v7oMyeh+eQTAlHZhw== X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-Network-Message-Id: ef9ddd4c-5c3b-4180-af53-08db0445e54a X-MS-Exchange-CrossTenant-AuthSource: DBBP189MB1433.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2023 11:17:24.9970 (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: DcHxWE2k6LfHA86U6VaWWv9bhiqc1hFhXeJCl+36kI5XjlyLhqC26V+tbIg3DNVQ3CduRELRggJIw3g6Y4zQOv1MyzWA8cNiIuNp8wfxAXM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5P189MB2551 Received-SPF: pass client-ip=2a01:111:f400:fe0e::727; envelope-from=sriram.yagnaraman@est.tech; helo=EUR04-VI1-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 Also introduce: - Checks for RXDCTL/TXDCTL queue enable bits - IGB_NUM_VM_POOLS enum (Sec 1.5: Table 1-7) Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 36 ++++++++++++++++++++++++++++-------- hw/net/igb_core.h | 1 + hw/net/igb_regs.h | 3 +++ 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index 1ddf54f630..c44b30b6d1 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -780,6 +780,18 @@ igb_txdesc_writeback(IGBCore *core, dma_addr_t base, return igb_tx_wb_eic(core, txi->idx); } +static inline bool +igb_tx_enabled(IGBCore *core, const E1000E_RingInfo *txi) +{ + bool vmdq = core->mac[MRQC] & 1; + uint16_t qn = txi->idx; + uint16_t pool = qn % IGB_NUM_VM_POOLS; + + return (core->mac[TCTL] & E1000_TCTL_EN) && + (!vmdq || core->mac[VFTE] & BIT(pool)) && + (core->mac[TXDCTL0 + (qn * 16)] & E1000_TXDCTL_QUEUE_ENABLE); +} + static void igb_start_xmit(IGBCore *core, const IGB_TxRing *txr) { @@ -789,8 +801,7 @@ igb_start_xmit(IGBCore *core, const IGB_TxRing *txr) const E1000E_RingInfo *txi = txr->i; uint32_t eic = 0; - /* TODO: check if the queue itself is enabled too. */ - if (!(core->mac[TCTL] & E1000_TCTL_EN)) { + if (!igb_tx_enabled(core, txi)) { trace_e1000e_tx_disabled(); return; } @@ -932,7 +943,7 @@ static uint16_t igb_receive_assign(IGBCore *core, const struct eth_header *ehdr, if (core->mac[MRQC] & 1) { if (is_broadcast_ether_addr(ehdr->h_dest)) { - for (i = 0; i < 8; i++) { + for (i = 0; i < IGB_NUM_VM_POOLS; i++) { if (core->mac[VMOLR0 + i] & E1000_VMOLR_BAM) { queues |= BIT(i); } @@ -966,7 +977,7 @@ static uint16_t igb_receive_assign(IGBCore *core, const struct eth_header *ehdr, f = ta_shift[(rctl >> E1000_RCTL_MO_SHIFT) & 3]; f = (((ehdr->h_dest[5] << 8) | ehdr->h_dest[4]) >> f) & 0xfff; if (macp[f >> 5] & (1 << (f & 0x1f))) { - for (i = 0; i < 8; i++) { + for (i = 0; i < IGB_NUM_VM_POOLS; i++) { if (core->mac[VMOLR0 + i] & E1000_VMOLR_ROMPE) { queues |= BIT(i); } @@ -989,7 +1000,7 @@ static uint16_t igb_receive_assign(IGBCore *core, const struct eth_header *ehdr, } } } else { - for (i = 0; i < 8; i++) { + for (i = 0; i < IGB_NUM_VM_POOLS; i++) { if (core->mac[VMOLR0 + i] & E1000_VMOLR_AUPE) { mask |= BIT(i); } @@ -1005,6 +1016,7 @@ static uint16_t igb_receive_assign(IGBCore *core, const struct eth_header *ehdr, queues = BIT(def_pl >> E1000_VT_CTL_DEFAULT_POOL_SHIFT); } + queues &= core->mac[VFRE]; igb_rss_parse_packet(core, core->rx_pkt, external_tx != NULL, rss_info); if (rss_info->queue & 1) { queues <<= 8; @@ -1562,12 +1574,12 @@ igb_receive_internal(IGBCore *core, const struct iovec *iov, int iovcnt, igb_rx_fix_l4_csum(core, core->rx_pkt); for (i = 0; i < IGB_NUM_QUEUES; i++) { - if (!(queues & BIT(i))) { + if (!(queues & BIT(i)) || + !(core->mac[RXDCTL0 + (i * 16)] & E1000_RXDCTL_QUEUE_ENABLE)) { continue; } igb_rx_ring_init(core, &rxr, i); - if (!igb_has_rxbufs(core, rxr.i, total_size)) { n |= E1000_ICS_RXO; trace_e1000e_rx_not_written_to_guest(rxr.i->idx); @@ -1966,9 +1978,16 @@ static void igb_set_vfmailbox(IGBCore *core, int index, uint32_t val) static void igb_vf_reset(IGBCore *core, uint16_t vfn) { + uint16_t qn0 = vfn; + uint16_t qn1 = vfn + IGB_NUM_VM_POOLS; + /* disable Rx and Tx for the VF*/ - core->mac[VFTE] &= ~BIT(vfn); + core->mac[RXDCTL0 + (qn0 * 16)] &= ~E1000_RXDCTL_QUEUE_ENABLE; + core->mac[RXDCTL0 + (qn1 * 16)] &= ~E1000_RXDCTL_QUEUE_ENABLE; + core->mac[TXDCTL0 + (qn0 * 16)] &= ~E1000_TXDCTL_QUEUE_ENABLE; + core->mac[TXDCTL0 + (qn1 * 16)] &= ~E1000_TXDCTL_QUEUE_ENABLE; core->mac[VFRE] &= ~BIT(vfn); + core->mac[VFTE] &= ~BIT(vfn); /* indicate VF reset to PF */ core->mac[VFLRE] |= BIT(vfn); /* VFLRE and mailbox use the same interrupt cause */ @@ -3874,6 +3893,7 @@ igb_phy_reg_init[] = { static const uint32_t igb_mac_reg_init[] = { [LEDCTL] = 2 | (3 << 8) | BIT(15) | (6 << 16) | (7 << 24), [EEMNGCTL] = BIT(31), + [TXDCTL0] = E1000_TXDCTL_QUEUE_ENABLE, [RXDCTL0] = E1000_RXDCTL_QUEUE_ENABLE | (1 << 16), [RXDCTL1] = 1 << 16, [RXDCTL2] = 1 << 16, diff --git a/hw/net/igb_core.h b/hw/net/igb_core.h index cc3b4d1f2b..9938922598 100644 --- a/hw/net/igb_core.h +++ b/hw/net/igb_core.h @@ -47,6 +47,7 @@ #define IGB_MSIX_VEC_NUM (10) #define IGBVF_MSIX_VEC_NUM (3) #define IGB_NUM_QUEUES (16) +#define IGB_NUM_VM_POOLS (8) typedef struct IGBCore IGBCore; diff --git a/hw/net/igb_regs.h b/hw/net/igb_regs.h index ddc0f931d6..4d98079906 100644 --- a/hw/net/igb_regs.h +++ b/hw/net/igb_regs.h @@ -160,6 +160,9 @@ union e1000_adv_rx_desc { #define E1000_MRQC_RSS_FIELD_IPV6_UDP 0x00800000 #define E1000_MRQC_RSS_FIELD_IPV6_UDP_EX 0x01000000 +/* Additional Transmit Descriptor Control definitions */ +#define E1000_TXDCTL_QUEUE_ENABLE 0x02000000 /* Enable specific Tx Queue */ + /* Additional Receive Descriptor Control definitions */ #define E1000_RXDCTL_QUEUE_ENABLE 0x02000000 /* Enable specific Rx Queue */ From patchwork Wed Feb 1 11:17:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriram Yagnaraman X-Patchwork-Id: 13124157 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 3444BC636D3 for ; Wed, 1 Feb 2023 11:18:33 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNB7V-0003jw-II; Wed, 01 Feb 2023 06:17:41 -0500 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 1pNB7U-0003jb-3V for qemu-devel@nongnu.org; Wed, 01 Feb 2023 06:17:40 -0500 Received: from mail-vi1eur04on0727.outbound.protection.outlook.com ([2a01:111:f400:fe0e::727] helo=EUR04-VI1-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 1pNB7S-00059m-BC for qemu-devel@nongnu.org; Wed, 01 Feb 2023 06:17:39 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=adYI1bRvFBsp7cY7MEl2nQkaDMaZyZWGFAIhXB23jIbKlkpmqsprXJdtHai4z7xYtjOu1/KCnZyX5aFw30qx1+GNiEb20qp2UzBBJvSzZbzqqWhZV0fZCBLeS2E2rDopEuwUfQcWp41QNCGFDFdK5ZX3eUDOGXn/WMzn1rSIU29UuMWJ5ZLJ9m9+wCFDuJsSfgGufX67+q/yDU86fXOGxk0uJk0QZelPxM5Kl9HgsGQiH4xbjePEKqvL5TIXU/GC5WlbhVJc4z5FMpWbvZZPPgQYRYw2wLJ6I1bwuq44t8xXtgmTglDHAeNzB51mPAftfHy71a7w/HaG5Xr43J9uSg== 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=2AS8nMdlVCqEfr0RcTjZDx2EXp1R/N3UANAxZIKsuRw=; b=cMyhKeYbx3Bbv8EvbavcpiIU4Y/t7cl1hlTy/Y42B6/3v5/ehGyAxwLrcTfyttJzUzjjjq+gKBCtuKMrboOidkae6ggkQiuOwQwUrvafBaFNS3vGpAPge7pAnKcB0C4hZgWLJycS0llhVnEZzDbpK7Z/lKgBnWjzixxD/04Nkkvh+66koTirN7g0esmrT5tCI45NcpHS8aHe2wd3ggFQAZgqoNm/QqzK6M24NJRo9FVoKw5tJ7BZ3wQ1Guas1iU8H/cJF5i0wHigyrjeBhAXbVMB5iv6hG7hPNUZh+j1irwAIIVyobns8q77vM+A0wNF9xzktMOXMJpICkocaX9FSw== 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=2AS8nMdlVCqEfr0RcTjZDx2EXp1R/N3UANAxZIKsuRw=; b=hTkN/s+/jn8/4ufC+njhuxZiKV6jlgkmX1e8LQsCu0KLYfCdJQBAPgYYVmmS1/Ji1/jI+i/toHV7V2oVPXev3vxWn8gjN0VMliFlA2nlD4jqRiyiGuQUSOd3y0iXPtZXRMVIejimUGpvtG+6gy5VW4X1XT1F9TuSod5m9WORK70= 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 DB5P189MB2551.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:489::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.38; Wed, 1 Feb 2023 11:17:26 +0000 Received: from DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::8f70:435b:ab64:9420]) by DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::8f70:435b:ab64:9420%8]) with mapi id 15.20.6043.038; Wed, 1 Feb 2023 11:17:26 +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 v4 5/9] igb: check oversized packets for VMDq Date: Wed, 1 Feb 2023 12:17:18 +0100 Message-Id: <20230201111722.28748-6-sriram.yagnaraman@est.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230201111722.28748-1-sriram.yagnaraman@est.tech> References: <20230201111722.28748-1-sriram.yagnaraman@est.tech> X-ClientProxiedBy: GVYP280CA0021.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:fa::29) To DBBP189MB1433.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:1e7::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DBBP189MB1433:EE_|DB5P189MB2551:EE_ X-MS-Office365-Filtering-Correlation-Id: 9a4b0d7a-c321-4f3f-f9b8-08db0445e577 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bvMZC3/Ob1rC17qmc7AB1JtMyjQ/LS9cRpnaaWvaVbx1lAFfVG/6NVMqopqLqBw+yRtb4PH3+Qu7qomDymQ4zYFktc7sJFhermNLlseDNCPShoaX7VWXtZMsNK7y71KWhH8GTD89H2iXyZfWpGisPjjxjwyXriXycg2IZIOU0F4nGXnXMtP4lHK84bgwDWvvPhYSvT/D++ocQEJKXGQ5panp/0i4n8fucSbxtD5Nck68WW/K6L9gFUhy7nRnjXNxlWUKSy2eC2e9l82SG9Wr/xVi6ioXt9Ocmi9bgPQYPisU8s3j23jffgUgPyTZ8p/4MVFJH0JVptPl+ELyFMemK6vmMUjHSP1NLr0t/07CWYlKkReMPK84VCgd8ISuOHizwwE5/axB68fzOzcy06xzh4RqO6EeRkC+ATptOpyJxrB3mdTC7wWSNoTNotdvNPegES6R5O7IUZjFnMnxNg06bU07UGIc+gk8II30qPJNcY817UzijIu6sL+YQd8rcwLW3FQyEyDbA+X4Fg4AT7CykjHM6mZBv2cNdY61UJh4kFBkNRxWKlkBx5G+nl2GhXuuR7WTczQcgRvfE/UWod+VvZbvth/ihTyfgxP08qKc9o84M21qlkxKNa9H9yR5Eg5BLEbZZOedlooBJVcmjoIZRe2WVme1kAIGZjuLNijcAsVAsCtrTAnLvJvII5JybwIxPRNxmkWIx6Mcq8JCXT8V9Ci712h5T/HoC72sUODkPHU= 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)(376002)(346002)(396003)(136003)(109986016)(451199018)(36756003)(2616005)(6666004)(6486002)(478600001)(2906002)(86362001)(38100700002)(8936002)(54906003)(1076003)(6506007)(66556008)(8676002)(5660300002)(316002)(41300700001)(44832011)(66476007)(66946007)(70586007)(4326008)(26005)(6512007)(186003)(83380400001)(266003)(37730700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ULDk8t5MTKNY5C+EtGx8yB+Cxy6V6qcCsRqbWAKujena3a8DhY2bzM41shfTGAUpvE8er/JKw6jrEuGeUMPYRVyMXXhWGm0nUxW4Noe+Ryi3wJiYeLEx4hZx2Q6sAAsMA55T2ygII6IAcQibuw8qfP8AymdEnURWqtRUtnfMQI4Ip62aUJuW4kQ/uNPcoRuCrgQ5DGKLASpOjzGArS0vp3j+9ntYpDQ73itJxMLCWmvoR3z+3Qw+YDakj9xMxVw9AtLytgV6imCZkRZsh2oKKLL/PZgvi2O4lFRwhxHBBopo9L7RDDRHXHzC6SISzN5TdsSPR1eZ80L06exRY6QVbAU36+JwjKt4u6YgasuHci194zJK3LCBvgDkipG0ev29kASKrl7DPj0pmvG7BIUoP+dSV3K2WlHb+jc2ncQRZc6DzIXuzc6QH3wZ5pT9m7JUUTiAs934toIZPLPzJUipZkSJqRzydESNnoja5oIFpzCpj6e7W99oRiot1wioIoDjjNRIeGTBBkvyZKHjYSH6CHrJR7jevpvutvCbW4k2H99JgAbRsuglaHJ69INjepsIWnzxGaBeVaNj4CfOlOe709YJULya7oVx582Iy6qZfQyAr7i6poQKnP8FJZN6LlC1+V+DnCxnM+hopc2PN+Ojh1ck1//CtMBRatpQlAng8NiDnoqyPZKBFn+pJxLYEkqJGwZG0t4YPEiK+bi9frwpCHD83vT0iRIjUANbraWDXGrOL+Yo2Osi6SPkR0+GGJCdmmK3Dapl1YQT7VaXM3DPOwOTZVsb/toWPeALZ8Pfqypcu2PEJSa43pwrv50GSf+wfVacfHXIhuKfHLePNdffaidJS3ih/GBeGbSv0MVxeQ92o5vn1SQJsy0UECmwMeMhySOtHtsOwx7hE0Fvqb0REbBdTxXDuTe7IWumM43WHyCossU3dn7ELR5t7pusWdxvXROMAE2qGXJmLsqvCZoT7k0dUVD6vrdb9kAbo2w6rRpYahVdypodysCdLcsi2s0qeUHU9fxijjMSCZZhtLgxWYoHFQZ4IYg5tDQx1rFbAo+w/AKar5W5neIBDNX3ZHuKQxO7Dk1Ey4kHzctigHCxc+/Mk/9b3HYzyqG3MTG/PKDfHCZr2v/17jyeFNTuWsLhDWDz9/rQbtwrB3C0oZbrZjfq4K7TWI3PBMsxiqxzP34CR9KvYrpHYCSRd3RM55K/8/f3SMdr6M/9O/UTV8ctOGr1rMt//HD4P8MTls4kSObtp05X+SFd+LQxY6ATSyTaUAM5JUA3qfnyqB5v0Jo6AyH7ZWn8+vA30EOHMFPH/xGr5nWzW4iJuTJUMX4riS6BZ2wOd/vDS7SHIl8z3tmcqVISe7U0+HMZiWFwhkRAAIdl23nU61sadrXzdre37HxSMwdGYg7lObQ53032Yu+cztUtXp0Ka5adIbNJ2BCfd3z1UquNdcnvXVpB6umdDMfwEiXuGuaR+eIzqEJ3VrRm8vLddqGwfWWpEvqG4nOQiwTxe7/V+2NJCk0fAXOgP6Pb6yBEEpCAmmQkVJKPHkcY9zpbFQcWRNw98GIpazXvNTxYldj9QumZEk703shuk71NTYHFdCXrcqpJkzngEcex6g== X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-Network-Message-Id: 9a4b0d7a-c321-4f3f-f9b8-08db0445e577 X-MS-Exchange-CrossTenant-AuthSource: DBBP189MB1433.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2023 11:17:25.3250 (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: oPk0xBGLoI0ybdTKu5lziUMMWms4bf9a++CX1N05/fK6pJs4meU/fG1UiAZciVc/LXeDcp6diGd35EA9OquViHOnLTk9WfqyHjr1mFosSJI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5P189MB2551 Received-SPF: pass client-ip=2a01:111:f400:fe0e::727; envelope-from=sriram.yagnaraman@est.tech; helo=EUR04-VI1-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 Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index c44b30b6d1..cda81a54bf 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -912,12 +912,26 @@ igb_rx_l4_cso_enabled(IGBCore *core) return !!(core->mac[RXCSUM] & E1000_RXCSUM_TUOFLD); } +static bool +igb_rx_is_oversized(IGBCore *core, uint16_t qn, size_t size) +{ + uint16_t pool = qn % IGB_NUM_VM_POOLS; + bool lpe = !!(core->mac[VMOLR0 + pool] & E1000_VMOLR_LPE); + int max_ethernet_lpe_size = + core->mac[VMOLR0 + pool] & E1000_VMOLR_RLPML_MASK; + int max_ethernet_vlan_size = 1522; + + return size > (lpe ? max_ethernet_lpe_size : max_ethernet_vlan_size); +} + static uint16_t igb_receive_assign(IGBCore *core, const struct eth_header *ehdr, - E1000E_RSSInfo *rss_info, bool *external_tx) + size_t size, E1000E_RSSInfo *rss_info, + bool *external_tx) { static const int ta_shift[] = { 4, 3, 2, 0 }; uint32_t f, ra[2], *macp, rctl = core->mac[RCTL]; uint16_t queues = 0; + uint16_t oversized = 0; uint16_t vid = lduw_be_p(&PKT_GET_VLAN_HDR(ehdr)->h_tci) & VLAN_VID_MASK; bool accepted = false; int i; @@ -1017,9 +1031,26 @@ static uint16_t igb_receive_assign(IGBCore *core, const struct eth_header *ehdr, } queues &= core->mac[VFRE]; - igb_rss_parse_packet(core, core->rx_pkt, external_tx != NULL, rss_info); - if (rss_info->queue & 1) { - queues <<= 8; + if (queues) { + for (i = 0; i < IGB_NUM_VM_POOLS; i++) { + if ((queues & BIT(i)) && igb_rx_is_oversized(core, i, size)) { + oversized |= BIT(i); + } + } + /* 8.19.37 increment ROC if packet is oversized for all queues */ + if (oversized == queues) { + trace_e1000x_rx_oversized(size); + e1000x_inc_reg_if_not_full(core->mac, ROC); + } + queues &= ~oversized; + } + + if (queues) { + igb_rss_parse_packet(core, core->rx_pkt, + external_tx != NULL, rss_info); + if (rss_info->queue & 1) { + queues <<= 8; + } } } else { switch (net_rx_pkt_get_packet_type(core->rx_pkt)) { @@ -1562,7 +1593,7 @@ igb_receive_internal(IGBCore *core, const struct iovec *iov, int iovcnt, e1000x_vlan_enabled(core->mac), core->mac[VET] & 0xffff); - queues = igb_receive_assign(core, ehdr, &rss_info, external_tx); + queues = igb_receive_assign(core, ehdr, size, &rss_info, external_tx); if (!queues) { trace_e1000e_rx_flt_dropped(); return orig_size; From patchwork Wed Feb 1 11:17:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriram Yagnaraman X-Patchwork-Id: 13124160 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 5CB98C05027 for ; Wed, 1 Feb 2023 11:18:57 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNB7R-0003hv-0W; Wed, 01 Feb 2023 06:17:37 -0500 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 1pNB7M-0003e4-0Y for qemu-devel@nongnu.org; Wed, 01 Feb 2023 06:17:32 -0500 Received: from mail-vi1eur05on2072a.outbound.protection.outlook.com ([2a01:111:f400:7d00::72a] helo=EUR05-VI1-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 1pNB7K-00059n-AL for qemu-devel@nongnu.org; Wed, 01 Feb 2023 06:17:31 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T47N2r4PKyHjTC4rkLKTKTXonJtCgSA7iksyR9yCsSYAP4uiIFj5ht2ZfWxlzi9ycvdK3+h/P7e7pdtx0yk9BiisgyFYwyUfv3HGyPrCCQltmaTvvhXDL19xDpYBYHXtDUE6soTf0uuFE7UFm3poT1hxzhD6vSbViHm5IIeSz1Y94oGQN73wZL9HMS5srk6Ulln6q/g+nkyMjCnPj06ZaXPCC499Y7SAgrp/rgaFVDiyVpCxEYRCeXwpoe/9zLC6WgBXVoCuk0fsG5Gwk7y6JKzcRZGhs+LVJeR4+X4Vbg7vNIlvfC473Y/UFpub+UtT+571mGwAC+h4xMrHRO3DvA== 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=p7zZf+KFg2lkjJS2Kk5CBQvfCNoMX7WhBjqVs6+/MjE=; b=Lhg5qv0C5oEm2I9zS454+It51O+XrN2vyrvEYoWqxDOKxET8faZ4PLnMChhL/ZeNvduOIZuUboMJq2/cE0Nfa5GSEXPgmGOvxLkXzubp9PjmGIGJ8sbqVwBlR7KZIYfm2zpAmZRq7d3Wu/5xqOVHbLcRHEXmjxijQN06dK/u1WbVmWaTYsWwu+PAeeRCra78Z+LkrydETZdBTE19gWJzvWeLFPS6zVQ7K9VDDGu0cfHomq+3GMjv9xg+NCzINP+Zjx7NvUjPCCcM069wQS60f4J/PjryYyvuX/kRhWS+xIE5pEgc5MZ3zrIznCpBX+wYkvxXCeDwOPqXlFsMQzXdlg== 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=p7zZf+KFg2lkjJS2Kk5CBQvfCNoMX7WhBjqVs6+/MjE=; b=k3W2Dy/vGkDOKUx+SEmURkWy8RO3Dp3hBG3j2Vw7sr4iiF2Q9/YGtpqW+ZYvCgHEi5CzF50J1LaPwhswVORR5p9Zrz/SMZbOsCyGHeElo0EizDnpZ/z95k44PAVs/VArpCF7xuuGgzvM5UajYMxTSNqNaT+3dV+bv+3ipz89r3s= 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 AM0P189MB0642.EURP189.PROD.OUTLOOK.COM (2603:10a6:208:19d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.38; Wed, 1 Feb 2023 11:17:26 +0000 Received: from DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::8f70:435b:ab64:9420]) by DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::8f70:435b:ab64:9420%8]) with mapi id 15.20.6043.038; Wed, 1 Feb 2023 11:17:26 +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 v4 6/9] igb: respect E1000_VMOLR_RSSE Date: Wed, 1 Feb 2023 12:17:19 +0100 Message-Id: <20230201111722.28748-7-sriram.yagnaraman@est.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230201111722.28748-1-sriram.yagnaraman@est.tech> References: <20230201111722.28748-1-sriram.yagnaraman@est.tech> X-ClientProxiedBy: GVYP280CA0017.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:fa::15) To DBBP189MB1433.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:1e7::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DBBP189MB1433:EE_|AM0P189MB0642:EE_ X-MS-Office365-Filtering-Correlation-Id: 3214cd3e-63b3-4892-cfff-08db0445e58f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FjuH0KZav1s0PzNHRq04w6b+egKxr6mO6WhDA1i67osfVxtvnkxpWaS5pJJRO6yjpJt/HDSMOvznfYerml1weA2FmaXQ0lxrr6o/zGSHrlXbbkoRqvNXG24MtX3lkFZBr2JEBpHESyarop8sjNMUdClL9ryLdtmal25Lriu1TqDLDMVleQI9sf/RWONW2us88/mpbQIhfaMErNUOb5psw/5P/c8gLRb98GeD8HDVyH596cwSHjdPW36qc2lEfONu/9o7KqO4+7FG/eEkZaJ+fGvdFuJUX2Nq6YptI8rcfb+RDqoJ/Ebt2g+P4a0Zi5188PRB8CaoroSPpWvlzjZof/YaFlc4zNzFrAW/Z2kyCdyLwF2+YwDYru3fZGAgxArGUa0v98KAdIqAZWrJnWctHHydvu0u/QE0DhJ9mCfk5GDyYtAD/igBa1OoCpwfpcE2On/iLd2T1J3dA2590gomVLmk4hyanJZiXUAT/899UA0P7zs35nFlBlFlBIkEFm2j4cpbkqhkgHKgOHAiLck9oz+ieJuHmm88EE0qWZTNK70X01WXkYMywz9tQRnEod+fjZUJb3hAJlgxhW6n87vMXWcRMyGRNcSfzSOW9FFP2BRaVAarTR3qWQFMdcHnG2QXosW+ZGxvGQbXjWcQL9sZwsk0EFg0BNTkPQRLvT4Tp4VoW+H3uNEFr5bJhRJtEre9WnnYhPk19i9X28c2yYVyNLuaBQ6wd2Sel8MnMNMZHeA= 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)(396003)(346002)(39840400004)(136003)(376002)(109986016)(451199018)(5660300002)(478600001)(2906002)(4744005)(41300700001)(44832011)(66556008)(4326008)(8676002)(316002)(70586007)(54906003)(66946007)(6486002)(66476007)(6512007)(6506007)(26005)(186003)(1076003)(83380400001)(6666004)(8936002)(38100700002)(2616005)(36756003)(86362001)(266003)(37730700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-M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vNlS8FSKMyS0wch9HKQ5tGAoDqdRar9/NTbricgrnAgkD8WKtPi++acNHwHscW58K+DR9VOoR2gifJJDLjphOJ9THBEaPibm5nlKQw6CmeQtAc5dKYnwbQQWnkI282KZ97TvaOVVOTfUJn8EArj1F0HhpLoV8CfAoLQsIAWbQwLQFQrk/s3MQDB0BLb2T2nPk0Vy2oW4p9ooeoh547FWa/1+KkITsUCijsyEybpDcVh8FSW0Kqm49D8SfqmdTnY0m/bgivHE3S6vXcnIOh9FAerMD8UuZEGOyDA6xV49qcA9ZoMDkFO070dS98ILbq4qFWok4VzpVr671J6X0aImbakPL7YkQpbGa5mzUs26N+3Tv5uKxPgJPN/ivdwpiNsZqSbhSvPfhOnr9jE9Rv8x1M+agqxQLnt0o+dE0xrc2j/CodQHSFJ/GEnBA97iv/C37j8fEWO2a83riXfj/1sy+5csabaKRdpVawq00JALqLvjZ2J1gFJhyiXWO2AYlxwG/NI9YDSVKXsuJlM/v5EusQXB4qL+9A== X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-Network-Message-Id: 3214cd3e-63b3-4892-cfff-08db0445e58f X-MS-Exchange-CrossTenant-AuthSource: DBBP189MB1433.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2023 11:17:25.4656 (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: YqCAN8Q1NFrd9fBYmjvb3r7xSJ/jmhNwyvEuQHVE2O+TzZKO1bSiY7xwEkJwiFHnzb/lgmavxP5+i363u2T8PXhu/jDPvNaivoD6wWCAjic= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0P189MB0642 Received-SPF: pass client-ip=2a01:111:f400:7d00::72a; envelope-from=sriram.yagnaraman@est.tech; helo=EUR05-VI1-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, RCVD_IN_DNSWL_NONE=-0.0001, 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 cda81a54bf..c0b20287f2 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -1048,8 +1048,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 { From patchwork Wed Feb 1 11:17:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriram Yagnaraman X-Patchwork-Id: 13124156 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 A802DC636D3 for ; Wed, 1 Feb 2023 11:18:19 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNB7S-0003jP-TJ; Wed, 01 Feb 2023 06:17:38 -0500 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 1pNB7Q-0003ho-BX for qemu-devel@nongnu.org; Wed, 01 Feb 2023 06:17:36 -0500 Received: from mail-db3eur04on0723.outbound.protection.outlook.com ([2a01:111:f400:fe0c::723] helo=EUR04-DB3-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 1pNB7O-0005AG-Lc for qemu-devel@nongnu.org; Wed, 01 Feb 2023 06:17:36 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VXv67QsJHnhzxIIfDJVgKYjEw1L/Eb2nC424hTsZa9+0S8mCttXyWIdva42iduAebMz0TL6c4aifD4ufiR8GMHKtjZUXUb7+P3Kg8A95B3DPUCQ8lgNb8tuXW1dRHgpyqwH1T9KdbXVvwa8h05Xeb5VbNCyfmONAORauD0wIFKiVOec6Q3sZhOOXzdNK3SYydd0n/l8Xc2vO4gaBE/Ux3GgOL22DT/zB7QxT+986vHWh4MRbFnOb3KJ1tBdvvXhXgDA4RYGUtcMuvMgVJMW0pct7Mxb7t81ue9kcBbNF8p4lC3CNZ4POa/NIDG/wmGIo6eOfaG0GavRu128rMPrMuA== 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=t5VsCVfVkCQ4ln6guIteSR/O2Ed1egWz6GVSp+tqtFA=; b=hk2cBG4GGdVdhKoQF2YLRu6TR3q1YQKx98Fzl2gYM1Q1PRXwA8xsurJFkn7+12ui8JmrMvQsQxD0/dRo+y8bSwlX5dyK/qMocgdphYX+DEP4WSNj9TOLo1hAVRPY3TWtd9svNR5UQoBvaHr0oYGF0L5j8YJt0o0AtLeEsVMWEaz0FlhH+SqYOsYnhGzlAOdkr/ykOtt94cBwXKAQCRqBLRfOAvsQbFMQO+hcG/U2iGkZF+PYb/7yWksupdqrhn1S/oQFFc0Z32pSl/CM8Kp8kqDwEFuhrPvRX3Lh+TMcEBzqEpc1YsDmX3DhELuMWu5XxeWIcWCKY9cIBNrODna92g== 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=t5VsCVfVkCQ4ln6guIteSR/O2Ed1egWz6GVSp+tqtFA=; b=CkCynTxA8Lj7M9m2jkrM7yPgJoCuVWKZ848thV0m1B71jdjR5CPk5sCXq/qxYaMN29ElobhQ1jkRkyD4UrJ4LoP1cEXD5X9pSySTfOaiOr8i1uCTuUOWwWllIjn4BLdtOPT6UsvUCnLuSoAYFxQPx9WtIon/IXyV/6Bw1aYWcNw= 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 GV2P189MB2407.EURP189.PROD.OUTLOOK.COM (2603:10a6:150:db::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.38; Wed, 1 Feb 2023 11:17:27 +0000 Received: from DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::8f70:435b:ab64:9420]) by DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::8f70:435b:ab64:9420%8]) with mapi id 15.20.6043.038; Wed, 1 Feb 2023 11:17:27 +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 v4 7/9] igb: implement VF Tx and Rx stats Date: Wed, 1 Feb 2023 12:17:20 +0100 Message-Id: <20230201111722.28748-8-sriram.yagnaraman@est.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230201111722.28748-1-sriram.yagnaraman@est.tech> References: <20230201111722.28748-1-sriram.yagnaraman@est.tech> X-ClientProxiedBy: GVYP280CA0019.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:fa::22) To DBBP189MB1433.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:1e7::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DBBP189MB1433:EE_|GV2P189MB2407:EE_ X-MS-Office365-Filtering-Correlation-Id: d7938832-80b2-46f2-e1cf-08db0445e5a2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z9HjlfbgYtkGNsCIjQ5DsJ71ifjzdP+Ry96IQJaHQvK7yQszi6k7k5YGurSA9YYVKEm/NFNYP19PNPrKrHCjiYIc/YCm7Y+RF8eRJSXiU9V6gQmnKJBDuii8FnA6LjxE77Soh9I6lx96XQAdUu9uX3i99A4pDzNS78/R+JNNg7Dmut0+ufjiLfxuYjf3xeBnxXejnGRzS8GD3jEOATuDGvU9QdXIzvhVOR//EpCFY9jtavL7kBz9y1DaEX5X97f57c3G4MmsslrRlcapQiNveshSR79CB+3qJJrHy6qFwsdoQGgvZbZhOu2VCpb611TAVtSvcVSlfFGC9Kr+pumh9O/aMhnkRwqncJQNgD3/NLpn8k7HXJIlhS4i6vnygD0ZogjxN7bUuh5xg8r/egHBm/B+W2n96kZxjUm6YWhCA+M5jhOklVysUwXc25wU5daK+pAG3dKGQksTV/uqGXww2R/NpiiCDqZxeh+ODZuPVCky3YQemFttRNTWZRNs81DFjvLYPZA9n7T6rU/hiOJod5al5PrMmydxuKegMVa/g1nOdpusIfK/KghIL3TFkAT6zHgHXleyp9hMOU5nollG20v5+OqMEBJgMJb5IlCU7GTWwvjsXGU61ekiLtTeS8EdtUQ91WqWyx6NvgA8eBvYzAzX1GrlJY6Tzc4khdk6I17NK8hbOptH01B6eJvJ8J9ogom5CNJ259xRoqSqn9ZS0tOzenu3KJVEQw0QxZbk4SU= 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)(346002)(136003)(396003)(376002)(39840400004)(451199018)(109986016)(4326008)(44832011)(2906002)(5660300002)(54906003)(1076003)(6506007)(36756003)(6666004)(8936002)(66946007)(83380400001)(186003)(2616005)(41300700001)(26005)(6512007)(70586007)(66556008)(66476007)(8676002)(478600001)(86362001)(6486002)(316002)(38100700002)(266003)(37730700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YYtb10aH3ozkKZ7neAP/0ZiBidqlgGsN9hEsmVStp6/7AGdfHFe2zhsTghrD9rY+dOVepvPUOvq/3BniT7oWw8Yr8zMPU5peeb1DUuSGIX/8kNKxYleFgfnaP6tgqjPnMlFaeptDOtyU4PE27JFBhw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Vrd1B+0N60vFsrCF3wkcNJnUmxZa/xL1AEL5oqiCEDZNpQSGrWC0GtiDuteVdiiby97ulKZqcQ3FIK0LOBSBF6MuT3/JIT1I3NCfsfeK7Te4TTz5OERxH7oUIZa9HKpfEWj6/QTgJKGd7q1ZNOoixxbzdH2NX4QBkIImvLw79U1YXw1pCXSfCkFaLBXBTSZM1S1pCIyAk4UxQdU1+JEASKw/1vnsqsxxWuQ8euEcRCRdRz+z0nqEZeux9/aE8pGZOQD6+PoHdi8hId20PklgSDZjZZ+xD+Hlac4TeoiRY+vgQRaFC6uv9uwV9i6FaMu//lcG3RUVdDoTkcyuPOLY5QK2N/e5bHT14aTiEj4+Y6ybsguUaH9NY7hl8MQ== X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-Network-Message-Id: d7938832-80b2-46f2-e1cf-08db0445e5a2 X-MS-Exchange-CrossTenant-AuthSource: DBBP189MB1433.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2023 11:17:25.6062 (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: vL4Ml9zT/jobkzyTvgWuKrM6C5FYoSx7HSFfL5/GZ0pGJmmXVcOCzFv4ZMbDhhDFPcxSd8vqAt5PI+0QP9dAl1PEAt02zw7VoxKasqqA3qI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2P189MB2407 Received-SPF: pass client-ip=2a01:111:f400:fe0c::723; envelope-from=sriram.yagnaraman@est.tech; helo=EUR04-DB3-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 Please note that loopback counters for VM to VM traffic is not implemented yet: VFGOTLBC, VFGPTLBC, VFGORLBC and VFGPRLBC. Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index c0b20287f2..e9b706df9c 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -490,7 +490,7 @@ igb_tx_pkt_send(IGBCore *core, struct igb_tx *tx, int queue_index) } static void -igb_on_tx_done_update_stats(IGBCore *core, struct NetTxPkt *tx_pkt) +igb_on_tx_done_update_stats(IGBCore *core, struct NetTxPkt *tx_pkt, int qn) { static const int PTCregs[6] = { PTC64, PTC127, PTC255, PTC511, PTC1023, PTC1522 }; @@ -517,6 +517,13 @@ igb_on_tx_done_update_stats(IGBCore *core, struct NetTxPkt *tx_pkt) core->mac[GPTC] = core->mac[TPT]; core->mac[GOTCL] = core->mac[TOTL]; core->mac[GOTCH] = core->mac[TOTH]; + + if (core->mac[MRQC] & 1) { + uint16_t pool = qn % IGB_NUM_VM_POOLS; + + core->mac[PVFGOTC0 + (pool * 64)] += tot_len; + core->mac[PVFGPTC0 + (pool * 64)]++; + } } static void @@ -579,7 +586,7 @@ igb_process_tx_desc(IGBCore *core, core->mac[VET] & 0xffff); } if (igb_tx_pkt_send(core, tx, queue_index)) { - igb_on_tx_done_update_stats(core, tx->tx_pkt); + igb_on_tx_done_update_stats(core, tx->tx_pkt, queue_index); } } @@ -1395,7 +1402,8 @@ igb_write_to_rx_buffers(IGBCore *core, } static void -igb_update_rx_stats(IGBCore *core, size_t data_size, size_t data_fcs_size) +igb_update_rx_stats(IGBCore *core, const E1000E_RingInfo *rxi, + size_t data_size, size_t data_fcs_size) { e1000x_update_rx_total_stats(core->mac, data_size, data_fcs_size); @@ -1411,6 +1419,16 @@ igb_update_rx_stats(IGBCore *core, size_t data_size, size_t data_fcs_size) default: break; } + + if (core->mac[MRQC] & 1) { + uint16_t pool = rxi->idx % IGB_NUM_VM_POOLS; + + core->mac[PVFGORC0 + (pool * 64)] += data_size + 4; + core->mac[PVFGPRC0 + (pool * 64)]++; + if (net_rx_pkt_get_packet_type(core->rx_pkt) == ETH_PKT_MCAST) { + core->mac[PVFMPRC0 + (pool * 64)]++; + } + } } static inline bool @@ -1512,7 +1530,7 @@ igb_write_packet_to_guest(IGBCore *core, struct NetRxPkt *pkt, } while (desc_offset < total_size); - igb_update_rx_stats(core, size, total_size); + igb_update_rx_stats(core, rxi, size, total_size); } static inline void From patchwork Wed Feb 1 11:17:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriram Yagnaraman X-Patchwork-Id: 13124155 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 AF4CDC636D3 for ; Wed, 1 Feb 2023 11:18:05 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNB7S-0003jB-MO; Wed, 01 Feb 2023 06:17:38 -0500 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 1pNB7N-0003hA-Ui for qemu-devel@nongnu.org; Wed, 01 Feb 2023 06:17:34 -0500 Received: from mail-vi1eur05on2072a.outbound.protection.outlook.com ([2a01:111:f400:7d00::72a] helo=EUR05-VI1-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 1pNB7M-00059n-EX for qemu-devel@nongnu.org; Wed, 01 Feb 2023 06:17:33 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kgUKHU/85At+x9IJijagqrZud6qM0Rym+9KOWWaNu2pRl1U5Auj+i2nHebgnANNcjKJaE3TS/8SUJjWL3Fov0SCVhCZKud+r4lk2bTtSQ/VoXAR94MjekhU56uIFyB4pz2DQCLoZ163WTYt3z76T84qz4Si16kqGHTp+kOgHlIN0gvdTUTbTd2a32yrnHnJ+dbDXe35bKHmo/ITixD1jY1GdZoo8W032ICcgfzpBfvChA00Y50kT4skH82YkKaiu1FlvP8OmWNPRBjMGvfnVN9vchidiNTvAq8qULrfD3QvP1ukpCjLxnK3z3sWYvGwSK0GABUe0XYIgmPQ4XQmZgQ== 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=hTwi21pOGjPzlbVpJDH76cUNCux9AW5UeKcRHc7Nw4o=; b=btvA7vJA8QTRU+1iwJZ2NAfyEJZiarGuNVnVVE9APtJzE9eI3KChWrpREhYNiRV8RQU0aExfiNr63W9Qp2YiUyDFrdSPM8AV0tEBCCLhQqrElBB1twNon5hA7EeEFQ62jXzv8mq06WkQ1JyF5U0CgHEBsK/rRX2FHN88QTWbFU37QYJgEg1THZOgJ5/Nmg8b8Fro1PPm5V2rFeTVsGRf5igCKAkxp8S4oSXrmypn88zeXQgtGpv2rTvqiR3RK8cytTeOo2YA8M/hQWFJVij5pVcerlM3/ANkHeK/cHgP4eHjHgVWhk5Ktr2+Kw6Dw1uoIEpugeVDQOvgq77kpdWU6A== 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=hTwi21pOGjPzlbVpJDH76cUNCux9AW5UeKcRHc7Nw4o=; b=iB/pWoxBBt2LlkIgdoBLcQQd0KlLGL72+gB2exfOI/byoZX7vlfHcQZPnVip0OHPcMB2D1s8MNNXYb6ur3wkYQ1+7UxWG2QTrVg9FlCAwl1ZNRh1oMXGK9sHBvT25vtbrF3pCftT7eB4l9Ja0q+ZeBGURrdr0VdsQemuG6u4GU4= 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 AM0P189MB0642.EURP189.PROD.OUTLOOK.COM (2603:10a6:208:19d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.38; Wed, 1 Feb 2023 11:17:26 +0000 Received: from DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::8f70:435b:ab64:9420]) by DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::8f70:435b:ab64:9420%8]) with mapi id 15.20.6043.038; Wed, 1 Feb 2023 11:17:26 +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 v4 8/9] igb: respect VT_CTL ignore MAC field Date: Wed, 1 Feb 2023 12:17:21 +0100 Message-Id: <20230201111722.28748-9-sriram.yagnaraman@est.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230201111722.28748-1-sriram.yagnaraman@est.tech> References: <20230201111722.28748-1-sriram.yagnaraman@est.tech> X-ClientProxiedBy: GVYP280CA0006.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:fa::11) To DBBP189MB1433.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:1e7::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DBBP189MB1433:EE_|AM0P189MB0642:EE_ X-MS-Office365-Filtering-Correlation-Id: ec2af6f3-5ac4-4b84-1d60-08db0445e59e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ufF6eEdU7R4GQo9+gmGYTHJMhSg6Q/Z5NVGoeJJe3UVDz0RidWeF1P+7zFfR5jd/qYWuYqWVkM+TEjOsmfrwaR57jXG0KtPdrOq4HNHLlmMtAL2R/TG6PYzkcbUybU62Si2CU2aRGvtwVImGPSVUAm3Z2HYGm2ID7krWxRUHnml/srUYfYQaB7aKlFU/6SzuKt/egFMPTega/OtDHaEM7Al9YtsX4J7i0kKVAL5h2WhaJFIytgnMkEef1UPgAB4fY35NYLjuZYMwuKxpNSD4tr9LDho3LMVnV7OGwiYdbLpHgykZbMTF/jUe87BQg26zD/yzLLWi7SNRwVHEMwje/6yRt0CD5Pe+suDoNNfQCQZP/JaiRh53PZs2MjNhtF/K7wYKMYqkiycfFAK6KJx5msgnsdN8nm3BVVsXxAUbTtdR7PwLkWJlUf/OXViZL9mKe+P4mrhxeAW8I7oZXfVLAj6Ul4MoYGIROR6bybuEAVPoOqJctPAr+vhv5UoPxAgKPS3HRzCAlygCx3tktUAH2qn/BhIlsLVd96+CDmfjFFHaR5FEFw+RWub0Z31IuxObar2QwUYbFXJGPc3zMWh0EkxYeLdFQO/jZ5aOYGC252i26L2Imlg4uEZRw5v0KVlqniM+a8xCc9neh8uHxC31XiLh8wt6XwrlbRsBaT6JeYnQqfV4lgfpF+5iejnCrFLLVEuntkOao77r92Cetj5l5So65MVkgaw6XP3fl8dp1ws= 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)(396003)(346002)(39840400004)(136003)(376002)(109986016)(451199018)(5660300002)(478600001)(2906002)(41300700001)(44832011)(66556008)(4326008)(8676002)(316002)(70586007)(54906003)(66946007)(6486002)(66476007)(6512007)(6506007)(26005)(186003)(1076003)(83380400001)(6666004)(8936002)(38100700002)(2616005)(36756003)(86362001)(266003)(37730700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cULuatnyBKQw28MhBvKqlxVvqG+dpQTy4g6Hdq0Iv2HOzp5DD+YjMb9JUdNWCWBqklxSDCdghxRL4qKsHNeZw+Iv5Sp3VTmTnC5NTB9zeVmjZRMXgYy4BIBBrD7icns23s3/W/yoGlbfzds9cB8JDGcanQSVKPwJHdqj5yhZFxME+3Qgr5hgu4nogo+NB8GYsYkDHVe0GOk2Dx//NktvIcKJH0zVoZC22fmPyaYoot5ShYmVtB4/xiIaDA/5vut7ptKbv+CSthXhZZylJXIhvseFwqXjCAzW+fbuApEajHIdoHZmk1GZHMXQIxZMTl1YQ4zioJLaZ9qIiPCscFRdLUYPnfII0Pq1cBCVmK/LrnSujmzzbdyFPJ/7ktcwqn1aA7Ip8wI33/vm6wfCq9jP/nx2UgIXt52zQPd7VkPmjN6/IxfK128ULqqZJY1mVAWQIiDW6tURKsrGZQIDDBH338nhNQSRx227HsUNvqrN6SYmL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jJDLZ+d/4rR+8lv36yrvxjJrfWBo7yofTxPcsrBbCfv3LgSQ== X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-Network-Message-Id: ec2af6f3-5ac4-4b84-1d60-08db0445e59e X-MS-Exchange-CrossTenant-AuthSource: DBBP189MB1433.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2023 11:17:25.5593 (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: AeaCn1bpOiAENbxpUpnZqYX+o1jUt6K2Hfxhz22ivTo8fUp1uBOqlmPIPUyskVJ3C5luvT0pqOR0r8/Cry54aNpjavPjTT5w16XYyGJ8eNI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0P189MB0642 Received-SPF: pass client-ip=2a01:111:f400:7d00::72a; envelope-from=sriram.yagnaraman@est.tech; helo=EUR05-VI1-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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Also trace out a warning if replication mode is disabled, since we only support replication mode enabled. Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 9 +++++++++ hw/net/trace-events | 2 ++ 2 files changed, 11 insertions(+) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index e9b706df9c..d1448dfcd3 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -963,6 +963,10 @@ static uint16_t igb_receive_assign(IGBCore *core, const struct eth_header *ehdr, } if (core->mac[MRQC] & 1) { + if (!(core->mac[VT_CTL] & E1000_VT_CTL_VM_REPL_EN)) { + trace_igb_rx_vmdq_replication_mode_disabled(); + } + if (is_broadcast_ether_addr(ehdr->h_dest)) { for (i = 0; i < IGB_NUM_VM_POOLS; i++) { if (core->mac[VMOLR0 + i] & E1000_VMOLR_BAM) { @@ -1009,6 +1013,11 @@ static uint16_t igb_receive_assign(IGBCore *core, const struct eth_header *ehdr, } } + /* assume a full pool list if IGMAC is set */ + if (core->mac[VT_CTL] & E1000_VT_CTL_IGNORE_MAC) { + queues = BIT(IGB_MAX_VF_FUNCTIONS) - 1; + } + if (e1000x_vlan_rx_filter_enabled(core->mac)) { uint16_t mask = 0; diff --git a/hw/net/trace-events b/hw/net/trace-events index 5665cccc1f..a4d074557b 100644 --- a/hw/net/trace-events +++ b/hw/net/trace-events @@ -287,6 +287,8 @@ igb_rx_desc_buff_write(uint64_t addr, uint16_t offset, const void* source, uint3 igb_rx_metadata_rss(uint32_t rss) "RSS data: 0x%X" +igb_rx_vmdq_replication_mode_disabled(void) "WARN: Only replication mode enabled is supported" + igb_irq_icr_clear_gpie_nsicr(void) "Clearing ICR on read due to GPIE.NSICR enabled" igb_irq_icr_write(uint32_t bits, uint32_t old_icr, uint32_t new_icr) "Clearing ICR bits 0x%x: 0x%x --> 0x%x" igb_irq_set_iam(uint32_t icr) "Update IAM: 0x%x" From patchwork Wed Feb 1 11:17:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriram Yagnaraman X-Patchwork-Id: 13124158 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 C221BC636D3 for ; Wed, 1 Feb 2023 11:18:43 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNB7T-0003jS-Ha; Wed, 01 Feb 2023 06:17:39 -0500 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 1pNB7S-0003il-Cw for qemu-devel@nongnu.org; Wed, 01 Feb 2023 06:17:38 -0500 Received: from mail-db3eur04on0723.outbound.protection.outlook.com ([2a01:111:f400:fe0c::723] helo=EUR04-DB3-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 1pNB7Q-0005AG-MR for qemu-devel@nongnu.org; Wed, 01 Feb 2023 06:17:38 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ai+mPGJXEINVVd/DFctr0Nmlda63cZlq/BQbgXT5+XHpIG0uXre35MnC3yB8SuBn6N2WRCUfkehdQRABNU59RtNwS+qe4MaU0K8PSNthC+HrTp8+fUYlIJdbPgGB8CScQx0LlCgzARTmkDoE///+TJHIZgAq1VrnQcDOZjv6Zona0vuVFUxC88Cz7IVJNSZOtVTDHr6tmhg2FwRDbM6J3vgFEobXAQPkxKE7/RXTa6n7kGQsSQPmKne7WIIn1gZsbwxnxwORmnSmpRdcu9JkrAoP5nJY84usIbsXh0mqyMcKoWh4KOtSINnp16E6Uk+yR5Xmtv0RVh4cl7ITI//pqw== 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=EuzuG+9i6P4kFIszAt1ctF56WIbt/Xet48loD/b7u1s=; b=aqt2Xsb1EdQ12VMlNsGKi092l1n7/i33c1/n8I0pRQQQJLZzKAvBVRzdSRtFLXlF/UjPav24MkUWRH5ykQaA+fu8vE/eAdyBCT/SNj7yCKCUHUWsSLnFP7fR+QYOfEjb2RZ+ZzAuERJxVe1uBCJHTqaaipbh7arUiBtSr3r4Fzx9EoLliAZmvSJ1Cu+BwpHPsvR/GeiHw7ANcvs25YKRDN0lC6RpeQIhj5snXdByrk5y1AxNoUzaGVWXw1RXnZ5GhtRuDu3fv7cKpwyBS8bYAPC+sN3+sVeVDZiem972uM/gQa1OYdI625yScaFjejhw0nAdG7AKOlujKQa+6TuApw== 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=EuzuG+9i6P4kFIszAt1ctF56WIbt/Xet48loD/b7u1s=; b=Ak932mB2l/kUk4OdKHczEMFQtPGfzknimsePoODdFKa/TkKbw5QzmO79wJ8F0YH8//b7IeKXzSc7blH1whLzALcpdur0inb2br4QN1PSPibLtbRjDM2+6eqEzxmzIUW9WOjAIpfeV2Lgu6IvJ/LxcoTHR5X2s02ynGmOO5R2MHE= 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 GV2P189MB2407.EURP189.PROD.OUTLOOK.COM (2603:10a6:150:db::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.38; Wed, 1 Feb 2023 11:17:28 +0000 Received: from DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::8f70:435b:ab64:9420]) by DBBP189MB1433.EURP189.PROD.OUTLOOK.COM ([fe80::8f70:435b:ab64:9420%8]) with mapi id 15.20.6043.038; Wed, 1 Feb 2023 11:17:28 +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 v4 9/9] igb: respect VMVIR and VMOLR for VLAN Date: Wed, 1 Feb 2023 12:17:22 +0100 Message-Id: <20230201111722.28748-10-sriram.yagnaraman@est.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230201111722.28748-1-sriram.yagnaraman@est.tech> References: <20230201111722.28748-1-sriram.yagnaraman@est.tech> X-ClientProxiedBy: GVYP280CA0007.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:fa::27) To DBBP189MB1433.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:1e7::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DBBP189MB1433:EE_|GV2P189MB2407:EE_ X-MS-Office365-Filtering-Correlation-Id: 8b1638e5-fbef-443c-7c98-08db0445e5bf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FR74vgn9Scbdik6Voac2m3J1KiBBfsuANkLuzOMqdwnqVRviCpt/9RBfzGXyR7ehz4wpM+59ThQ5MX1Dd1K7D1ldk+Hqqlj/z9M9MVvYFgEx69CuEQig2jlImorVYqtJ+5ddoCqsfccZThQThTekXSD7TtMLoUEYRW45SIreasPssw7+kZozKrxc/KsuiKwbYyzRJqgd6xD7u4JQvYkLy32Av+VMbhZ//agr/aajCRTKH9pg9B1rb+XjPMKTwEFhvXJuLJz7LHdNmmM9EzX4WOORv13jK/MoY4iYbYRTrSsec74XK3EAJw34tRSQRpMLk0kHU5ak5m7wZiM8T1HLdcvk4XgvW9tboM12vnf/OGBA2V+F4BX31wXVkrXqCCU/AeUMkP1L9uBLzC74k+8noToY7bcbvbCcwvWPlLkmkaVs5dZQ/JsUfjmIjP7obWIQPI6O52RgU+Lqo7Z/X88FMpTDln1XT16haODpCIu7O4lmuqpB0NSOQuNifQh3IHi4zpUm2JQwGPH9nLTRuwkHAtwTskCRHV10QPCll8OvDj4qdHJgsVztXA4PNHVtFZN4puiTtc07CP+j4Yas1cyzvjmpQ7YLdNOgsB6qzUsim2bmhH8cs3ggIOi+wixYJyqD0Y7eLrBMNxFfrktWNjRhuQJbgb2Dw18W9YujC4alky356TYa+NBnWJJ0xB1y2Ek9aEMsOS7JKAW7e+U48M09/53QBOmzaTIotl1AocZlB2s= 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)(346002)(136003)(396003)(376002)(39840400004)(451199018)(109986016)(4326008)(44832011)(2906002)(5660300002)(54906003)(1076003)(6506007)(36756003)(6666004)(8936002)(66946007)(83380400001)(186003)(2616005)(41300700001)(26005)(6512007)(70586007)(66556008)(66476007)(8676002)(478600001)(86362001)(6486002)(316002)(38100700002)(266003)(37730700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0DU41V9yuRm9tKfi3MqiRlEXtXXXfYT6rdSV1fSW57a2oehgH/LKSMtNJLO+I8RFuJCGOKWyd5eTc98BN3+KuCq3WDOjNTsAzE2uoOUXKAtyJC21gQMKaAhTktl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mwynHZPM4FgRfOeOTccRVeIBnSoBUX39VR05pOW/jJO7YSY0iU1gdV9+/A4MPP+6zdgOOWF5ZqcKEetNL0mn9ZKKqLfPsooFnIGGDzE0LI2A6Yaqg6XsrEP3MarwQPblI/bNbZJz0FHPWcTo7+2WHob/JR6ZLC0YTsm3QwGT+xOsaUVAIlX66cB6Tfr6CRh3fm2QpuVYl04MrHyjZnf0+gPPs9dr9BMdhGM1E96497LAi+/2Zz63rohgaTcM5Lz4JaYTxyB+x8/HO9A0v9hVMrvYqMakDKmorGIxJHyuAuFXePwCcuWn2IA0lzydHmqUBGOW2rr79VZQYIU8Y4sUHU/98kM8jXWIfIadCTFM0OPFLFyHxF9AHkZnk6idvIjIk8Nhk7aKkLjjDA6eV9YndJPwYIN7nXUYmCxX4n8Ew== X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-Network-Message-Id: 8b1638e5-fbef-443c-7c98-08db0445e5bf X-MS-Exchange-CrossTenant-AuthSource: DBBP189MB1433.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2023 11:17:25.7624 (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: XFlJ5yevXZQ2SaJiPuyUa/PvLGl7QXOU1VIHTVTPKU7757L80Ag5L0R9IK0/2/SdJxQAV7y9B0FB73tGS2ObXm5h1PNmK0hXN3+PkToHn9E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2P189MB2407 Received-SPF: pass client-ip=2a01:111:f400:fe0c::723; envelope-from=sriram.yagnaraman@est.tech; helo=EUR04-DB3-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 Add support for stripping/inserting VLAN for VFs. Had to move CSUM calculation back into the for loop, since packet data is pulled inside the loop based on strip VLAN decision for every VF. net_rx_pkt_fix_l4_csum should be extended to accept a buffer instead for igb. Work for a future patch. Signed-off-by: Sriram Yagnaraman --- hw/net/igb_core.c | 54 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index d1448dfcd3..d46aee47ac 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -386,6 +386,25 @@ igb_rss_parse_packet(IGBCore *core, struct NetRxPkt *pkt, bool tx, info->queue = E1000_RSS_QUEUE(&core->mac[RETA], info->hash); } +static inline bool +igb_tx_insert_vlan(IGBCore *core, uint16_t qn, + struct igb_tx *tx, bool desc_vle) +{ + if (core->mac[MRQC] & 1) { + uint16_t pool = qn % IGB_NUM_VM_POOLS; + + if (core->mac[VMVIR0 + pool] & E1000_VMVIR_VLANA_DEFAULT) { + /* always insert default VLAN */ + desc_vle = true; + tx->vlan = core->mac[VMVIR0 + pool] & 0xffff; + } else if (core->mac[VMVIR0 + pool] & E1000_VMVIR_VLANA_NEVER) { + return false; + } + } + + return desc_vle && e1000x_vlan_enabled(core->mac); +} + static bool igb_setup_tx_offloads(IGBCore *core, struct igb_tx *tx) { @@ -581,7 +600,8 @@ igb_process_tx_desc(IGBCore *core, if (cmd_type_len & E1000_TXD_CMD_EOP) { if (!tx->skip_cp && net_tx_pkt_parse(tx->tx_pkt)) { - if (cmd_type_len & E1000_TXD_CMD_VLE) { + if (igb_tx_insert_vlan(core, queue_index, tx, + !!(cmd_type_len & E1000_TXD_CMD_VLE))) { net_tx_pkt_setup_vlan_header_ex(tx->tx_pkt, tx->vlan, core->mac[VET] & 0xffff); } @@ -1542,6 +1562,20 @@ igb_write_packet_to_guest(IGBCore *core, struct NetRxPkt *pkt, igb_update_rx_stats(core, rxi, size, total_size); } +static bool +igb_rx_strip_vlan(IGBCore *core, const E1000E_RingInfo *rxi) +{ + if (core->mac[MRQC] & 1) { + uint16_t pool = rxi->idx % IGB_NUM_VM_POOLS; + /* Sec 7.10.3.8: CTRL.VME is ignored, only VMOLR/RPLOLR is used */ + return (net_rx_pkt_get_packet_type(core->rx_pkt) == ETH_PKT_MCAST) ? + core->mac[RPLOLR] & E1000_RPLOLR_STRVLAN : + core->mac[VMOLR0 + pool] & E1000_VMOLR_STRVLAN; + } + + return e1000x_vlan_enabled(core->mac); +} + static inline void igb_rx_fix_l4_csum(IGBCore *core, struct NetRxPkt *pkt) { @@ -1622,10 +1656,7 @@ igb_receive_internal(IGBCore *core, const struct iovec *iov, int iovcnt, ehdr = PKT_GET_ETH_HDR(filter_buf); net_rx_pkt_set_packet_type(core->rx_pkt, get_eth_packet_type(ehdr)); - - net_rx_pkt_attach_iovec_ex(core->rx_pkt, iov, iovcnt, iov_ofs, - e1000x_vlan_enabled(core->mac), - core->mac[VET] & 0xffff); + net_rx_pkt_set_protocols(core->rx_pkt, filter_buf, size); queues = igb_receive_assign(core, ehdr, size, &rss_info, external_tx); if (!queues) { @@ -1633,11 +1664,6 @@ igb_receive_internal(IGBCore *core, const struct iovec *iov, int iovcnt, return orig_size; } - total_size = net_rx_pkt_get_total_len(core->rx_pkt) + - e1000x_fcs_len(core->mac); - - igb_rx_fix_l4_csum(core, core->rx_pkt); - for (i = 0; i < IGB_NUM_QUEUES; i++) { if (!(queues & BIT(i)) || !(core->mac[RXDCTL0 + (i * 16)] & E1000_RXDCTL_QUEUE_ENABLE)) { @@ -1645,12 +1671,20 @@ igb_receive_internal(IGBCore *core, const struct iovec *iov, int iovcnt, } igb_rx_ring_init(core, &rxr, i); + net_rx_pkt_attach_iovec_ex(core->rx_pkt, iov, iovcnt, iov_ofs, + igb_rx_strip_vlan(core, rxr.i), + core->mac[VET] & 0xffff); + + total_size = net_rx_pkt_get_total_len(core->rx_pkt) + + e1000x_fcs_len(core->mac); + if (!igb_has_rxbufs(core, rxr.i, total_size)) { n |= E1000_ICS_RXO; trace_e1000e_rx_not_written_to_guest(rxr.i->idx); continue; } + igb_rx_fix_l4_csum(core, core->rx_pkt); igb_write_packet_to_guest(core, core->rx_pkt, &rxr, &rss_info); core->mac[EICR] |= igb_rx_wb_eic(core, rxr.i->idx);