From nobody Thu Dec 26 14:13:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1505387337480183.09202335465716; Thu, 14 Sep 2017 04:08:57 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 79EE721E70D21; Thu, 14 Sep 2017 04:05:45 -0700 (PDT) Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0070.outbound.protection.outlook.com [104.47.41.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4ECCA21E3EA77 for ; Thu, 14 Sep 2017 04:05:42 -0700 (PDT) Received: from ubuntu-010236106000.amd.com (165.204.78.1) by DM2PR12MB0156.namprd12.prod.outlook.com (2a01:111:e400:50ce::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12; Thu, 14 Sep 2017 11:08:39 +0000 X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=rZk46ixxaQfI64vJR8UjSrncAeRMpBbS9b5s+2A55Jk=; b=1g3sDyGJ0qGR/pBGcnTPZ8S7JlAImpSDCzZihpohyr3aju+7eirxco61LQgVgrGDhXQRD0cI9tKH9gJzJnjZZVlJeKa1onrSkYx7Ex6o4IKQmc5uJlSdFXDYd5mpEWblk4VdAyKItw2nzIfqcRSo9/MQwNyH1vvtjTStDw70ZgQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: edk2-devel@lists.01.org Date: Thu, 14 Sep 2017 06:08:19 -0500 Message-Id: <20170914110822.112540-6-brijesh.singh@amd.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20170914110822.112540-1-brijesh.singh@amd.com> References: <20170914110822.112540-1-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: BN6PR08CA0083.namprd08.prod.outlook.com (2603:10b6:404:b6::21) To DM2PR12MB0156.namprd12.prod.outlook.com (2a01:111:e400:50ce::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 91a328ad-36ac-4786-f2e3-08d4fb60f42e X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM2PR12MB0156; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0156; 3:d2jEUkfjrzMTDwBeuOx+ris4eBNdVsbua0ukiOt3YYOb7jWKgaeiuEzWgvBp2/Y/sxgtc2QZiXGKu0uWk6En0ynNU3izwGMkfundxjdHbeE7cV6Dm6+6Nmvxnhgj7h1jNjItw7R1b6NMDwfRk+ic8vwDjspC+h4dYVEpZSGDbvwoYHQlgsVkzM1gTO00qm5UhoOIk6cvbTcCv09BM8O1Qz3ZBybp8OQ0JErTswNOQ96wFkpWI41UmkWcJQT9a0oh; 25:NhoG+Xyh31E2W5czd9Em0jvJfLOOsNa0kDwMSFXs1AeI05eKHBlG44HOIydh3vU36IqPc+6Hu1fXkYdzaFfuoScatWO2g13OOj8TZsqi97VCGHXl/F3p+e2yKDSiyWWDvVxG5RCk4uNb/VvpeTYh4JhDZ+Qh28zJ3JtdEaxUaJjNl1lnbq/mQDmx52s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VUHJcye/MEER78gxHDeZaiznVkS4wQWdBUQf22U9G7U7b3az3/23qxwnVJ1T0oeaE5Jh3biCH3mILmO9gv6mVrXN58kxG1xJJicM56Rv/CelLMYy64X2lEKmhOypi8JEwS5xeksCyYDwDGlwfSDxXlHXvzAqzdCZfTWGUmVUz/lsBfuc4O6KEEEiYpiZjZFkjH+dGcM9Q/VQZNho4OM1vLrhLD/LNY132Xo7EKCq4a9+zV97K8ec2LMdIE6IL1JOZsa54fDn4b9axNs= X-Exchange-Antispam-Report-Test: UriScan:(20558992708506)(767451399110)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(100000703101)(100105400095)(6055026)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(20161123564025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR12MB0156; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR12MB0156; X-Forefront-PRVS: 0430FA5CB7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(39860400002)(189002)(199003)(189998001)(50986999)(76176999)(105586002)(106356001)(33646002)(2361001)(2351001)(5660300001)(6666003)(6916009)(2950100002)(6116002)(25786009)(36756003)(1076002)(101416001)(68736007)(3846002)(53416004)(16586007)(6486002)(478600001)(97736004)(50226002)(110136004)(81156014)(47776003)(48376002)(16526017)(81166006)(54906002)(8676002)(8936002)(15650500001)(7736002)(316002)(305945005)(2906002)(4326008)(53936002)(86362001)(5003940100001)(50466002)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR12MB0156; H:ubuntu-010236106000.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR12MB0156; 23:DNy7UQJzypqq7gC/qFbBew5AnUivGinAPCpIf8R3/?= =?us-ascii?Q?qaSBd86lKG/dpYTY85J/6n92NpcHBUZfRizZEJ1WQXToEMtQQoS5TAhnehdo?= =?us-ascii?Q?S1AASdR1vhANFN3n9WrjkFiYsfdBg/tfSaPUBxETsbcQwFe/E4ir4A9AdQtF?= =?us-ascii?Q?PkxZ1E0PiJ2db67bk1whmD3ZScjyB9w7UTBfXQYy+nhj7+EGMwe9XP0x/MDe?= =?us-ascii?Q?X+SE2UKdOx/KmxhmXt8BM1ud5FB+OcokZA0MQUcgQ1tuPYGla7eg64EiKqO9?= =?us-ascii?Q?Ou4Dodsbpz/BblET8VUD6gJwaqKwtir2OOxvZqpZda/p7dY85S/icCYzBXdQ?= =?us-ascii?Q?p8po9yGhNFt3/nmel0WUKTvPJy8Xu14CWX4kgw8Lf/1m+7W5g3wFMijpbXoi?= =?us-ascii?Q?E1Rl5j950ffY0kTPfAfYi0B1CDk2E6TRJuxD6dsrCAp0bpkAc5Cu+AvvWpWk?= =?us-ascii?Q?uAj3ZpOg6MVep6q7aquDH2E73eGq0gEArPaghT67J23PflcFxbgeVGE2TqRR?= =?us-ascii?Q?fj0KnyDEioZSncakmd/PjDSjXWy4/LfXWXlCz6veKeNxAE3/umJMZIUj/q8S?= =?us-ascii?Q?fSYxCHBWeAj3RX3XoJiR5jMloZhZIJcVLjfEbTv2nyfbhB8uyN9b5to12sJ2?= =?us-ascii?Q?yBZEulJo4+evu+SecIsBCp1rwpY6KUFoYZTVtoaBvmSG0wH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isjrTTx/eL0Q6BBi1Aog0pddFWcm2l7mAk77FUUOB4GWYtQjw8bZQf7VURoN5EjgEmUWi9s+4O2Tp5kXw5Rz9ojgoU+d7wTXOP2yA==; 24:7xtwS4z0LZpMCnMPGEuRo1aC1IbkT7JVKT92F9Eb2dORzedzoI5rFhJ1250v8K7C58MOgusC4rVLjL2z9VelBpEs0qH5LTPbBDoSNheAoKc=; 7:pNyEh7eFSAtf3rhHEHqVkpwoD6XWOHWtEcSSt1/jvtOMdzk/g2OiPvoGB4UvM/O15+yeojfZHzgDe/pBQEUXkXExOP51vkZZP0p3bqefTbByC0SPEXqlAoJnIdcad2koaaWNHWu/Tzzz3SuQsQOjfusj1nKEnQ5no+QLQHHOC3dDf9t8H8o8W1ekm2ebp8JxyiYl2IDmZzjAAdXnWybuKWVsgVHUMyP+heedyQrmDg0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0156; 20:TFLOj8Nhhf8FHoJguc6kCJPkenjhajY6cPU/BdYTXFDpsIYLjD0rwiehKYAwvFkP0bPgHxx5dDsx4frlgf8hVR7QXykqU5V8UPu0JihnggTCCCotz5s7v6Vl1R8wR+BgkfCZ+ibaPNH+oGTD446Hh4Lax5S0A8NahfcuS86ox91BPRD6Us53E/sV6UiwK6c1eCnwHn2UIKN0+9bY+sZdVTqMj6UiP40fkeZT5aLMfh7gLpnMt85qkPsLgakzqbya X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2017 11:08:39.1982 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0156 Subject: [edk2] [PATCH v3 5/8] OvmfPkg/VirtioNetDxe: update TechNotes X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jordan Justen , Tom Lendacky , Brijesh Singh , Laszlo Ersek , Ard Biesheuvel Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" In next patches we will update Virtio transmit to use the device-mapped address of the caller-supplied packet. The patch documents the new model. Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Tom Lendacky Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Brijesh Singh Reviewed-by: Laszlo Ersek --- OvmfPkg/VirtioNetDxe/TechNotes.txt | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/OvmfPkg/VirtioNetDxe/TechNotes.txt b/OvmfPkg/VirtioNetDxe/Tech= Notes.txt index fedbaee07ec7..40a22f66dc22 100644 --- a/OvmfPkg/VirtioNetDxe/TechNotes.txt +++ b/OvmfPkg/VirtioNetDxe/TechNotes.txt @@ -312,10 +312,14 @@ in the following: that is shared by all of the head descriptors. This virtio-net request h= eader is never modified by the host. =20 -- Each tail descriptor is re-pointed to the caller-supplied packet buffer - whenever VirtioNetTransmit places the corresponding head descriptor on t= he - Available Ring. The caller is responsible to hang on to the unmodified b= uffer - until it is reported transmitted by VirtioNetGetStatus. +- Each tail descriptor is re-pointed to the device-mapped address of the + caller-supplied packet buffer whenever VirtioNetTransmit places the + corresponding head descriptor on the Available Ring. A reverse mapping, = from + the device-mapped address to the caller-supplied packet address, is save= d in + an associative data structure that belongs to the driver instance. + +- Per spec, the caller is responsible to hang on to the unmodified packet + buffer until it is reported transmitted by VirtioNetGetStatus. =20 Steps of packet transmission: =20 @@ -338,9 +342,11 @@ Steps of packet transmission: - Client code calls VirtioNetGetStatus. In case the Used Ring is empty, the function reports no Tx completion. Otherwise, a head descriptor's index = is consumed from the Used Ring and recycled to the private stack. The client - code's original packet buffer address is fetched from the tail descriptor - (where it has been stored at VirtioNetTransmit time) and returned to the - caller. + code's original packet buffer address is calculated by fetching the + device-mapped address from the tail descriptor (where it has been stored= at + VirtioNetTransmit time), and by looking up the device-mapped address in = the + associative data structure. The reverse-mapped packet buffer address is + returned to the caller. =20 - The Len field of the Used Ring Element is not checked. The host is assum= ed to have transmitted the entire packet -- VirtioNetTransmit had forced it be= low --=20 2.9.5 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel