Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1716917ybl; Thu, 5 Dec 2019 06:02:49 -0800 (PST) X-Google-Smtp-Source: APXvYqzr+6LZdy7AkJPLBnwx4XoUmKK5n7LtMTv2bZNvTnoMADvbmYSOcbFY+nsXDPsK4D91oczQ X-Received: by 2002:a05:6808:64e:: with SMTP id z14mr6484304oih.79.1575554569100; Thu, 05 Dec 2019 06:02:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575554569; cv=none; d=google.com; s=arc-20160816; b=f2LGCYBnWOb1kSsiB9KdycwCu4w3X03903738CSAMx0M2S9p16gp7KGAJdS27OVrfl gpdq9w+vMvLOlfYxwABRb3lIZ1jM1GXJyNWiT1F7CNns6BQrTUsY5P9O9ISDD7uXjZBJ H5NWeU73frN8lW9+56irZ4qbH+Y03QLNIYbwnaLnEtkUU4QG1PzAb11wp/8WF/XrY3Xv f18HVZtuC95+rb2vJaAXm7BPxcOC75p3j0i9vPdPXPlRLSHkpdv6+18iHHqf8KLGwsjI o2VJ7QNVV21RkpWJzQ+OoblbWifrI7yWdLvbmVTDOjDn7JHz12W6nPUNxQfQo21vATFT 37+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:dkim-signature; bh=3V/slw6i8lEhvkIzZyT6X8o1Z4Oo4kiWfC2gC+XC92E=; b=JYaQCij2tD5+dJjVlOxNdVFgNvPvKLeHBimAWobyVOxSJMwUN3Hdtggr1fcYVRtpe0 XkrSQW7414k+gBUWLDrYI69e2pQ0bHL7bP+lf2ePjgvTnCyYzkxsThDOd2pJFumYZ+I2 Qzz1Dc0EdaMrxFztjoSq/lcEbXmR/z0Y02TwQLbktqr1vIrxSGtW+xClNpneYOg72GOz kZRJp4cYWjhTnpQDnjIOYKXTL/GkXrVI2F6mP9N96nZkhJ8a2MOYGL/ao/6qp4RCzERp WTnxIqUCsG2Jae9jyzdk+1Xezzg8hPAqPzb3yJ5vznGXC3KzGtBWZ5sofjFfxm3UMiBK HaKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b="e/zfhcrU"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g126si5064117oib.105.2019.12.05.06.02.29; Thu, 05 Dec 2019 06:02:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b="e/zfhcrU"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729629AbfLEOBx (ORCPT + 99 others); Thu, 5 Dec 2019 09:01:53 -0500 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]:10787 "EHLO smtp-fw-9102.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729598AbfLEOBv (ORCPT ); Thu, 5 Dec 2019 09:01:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1575554511; x=1607090511; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3V/slw6i8lEhvkIzZyT6X8o1Z4Oo4kiWfC2gC+XC92E=; b=e/zfhcrUs8YBDAcPMluZdoedp8ptazW6MdTWmvv2n3Gp2I5YgJvGgH2M OB/zj+lT2rtlUaewmWpgAYpSIZJnmQ+tu6XhvuLlyCvjbaVLY9DczknB4 nEiD7Aw0hg3TGgQKqVC5m1fHPhyoA9TCsGiKtgHHwbEUG5FChFofWLHA1 8=; IronPort-SDR: jZ7e9uzRrTtrcEfwO8IvA3gzi/yT0CgX020KZM87+W0LUhDIm/3rcRxMA2UpgNXRQmt4BPG2e6 WcmrHkejHKfA== X-IronPort-AV: E=Sophos;i="5.69,281,1571702400"; d="scan'208";a="11809799" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1d-f273de60.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP; 05 Dec 2019 14:01:42 +0000 Received: from EX13MTAUEA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1d-f273de60.us-east-1.amazon.com (Postfix) with ESMTPS id F0512A283A; Thu, 5 Dec 2019 14:01:41 +0000 (UTC) Received: from EX13D32EUC001.ant.amazon.com (10.43.164.159) by EX13MTAUEA001.ant.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 5 Dec 2019 14:01:41 +0000 Received: from EX13MTAUWC001.ant.amazon.com (10.43.162.135) by EX13D32EUC001.ant.amazon.com (10.43.164.159) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 5 Dec 2019 14:01:39 +0000 Received: from u2f063a87eabd5f.cbg10.amazon.com (10.125.106.135) by mail-relay.amazon.com (10.43.162.232) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Thu, 5 Dec 2019 14:01:38 +0000 From: Paul Durrant To: , CC: Paul Durrant , Boris Ostrovsky , Juergen Gross , "Stefano Stabellini" Subject: [PATCH 3/4] xen/interface: don't discard pending work in FRONT/BACK_RING_ATTACH Date: Thu, 5 Dec 2019 14:01:22 +0000 Message-ID: <20191205140123.3817-4-pdurrant@amazon.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191205140123.3817-1-pdurrant@amazon.com> References: <20191205140123.3817-1-pdurrant@amazon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently these macros will skip over any requests/responses that are added to the shared ring whilst it is detached. This, in general, is not a desirable semantic since most frontend implementations will eventually block waiting for a response which would either never appear or never be processed. NOTE: These macros are currently unused. BACK_RING_ATTACH(), however, will be used in a subsequent patch. Signed-off-by: Paul Durrant --- Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini --- include/xen/interface/io/ring.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/xen/interface/io/ring.h b/include/xen/interface/io/ring.h index 3f40501fc60b..405adfed87e6 100644 --- a/include/xen/interface/io/ring.h +++ b/include/xen/interface/io/ring.h @@ -143,14 +143,14 @@ struct __name##_back_ring { \ #define FRONT_RING_ATTACH(_r, _s, __size) do { \ (_r)->sring = (_s); \ (_r)->req_prod_pvt = (_s)->req_prod; \ - (_r)->rsp_cons = (_s)->rsp_prod; \ + (_r)->rsp_cons = (_s)->req_prod; \ (_r)->nr_ents = __RING_SIZE(_s, __size); \ } while (0) #define BACK_RING_ATTACH(_r, _s, __size) do { \ (_r)->sring = (_s); \ (_r)->rsp_prod_pvt = (_s)->rsp_prod; \ - (_r)->req_cons = (_s)->req_prod; \ + (_r)->req_cons = (_s)->rsp_prod; \ (_r)->nr_ents = __RING_SIZE(_s, __size); \ } while (0) -- 2.20.1