Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8521296rwp; Wed, 19 Jul 2023 11:00:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlEgFlSCe6fILz8M2tlLKoOCchz4jXHxB+ZjR6A2Won7rGItjl1WCo/njQwkBqswxnNfTEtd X-Received: by 2002:a17:906:1096:b0:988:699d:64d0 with SMTP id u22-20020a170906109600b00988699d64d0mr3169545eju.32.1689789640952; Wed, 19 Jul 2023 11:00:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689789640; cv=none; d=google.com; s=arc-20160816; b=DRsuTXXHH5NuPEBiLdAxh4Nzgkvxp+4cxS27doQcpjOfzcN834igMaGY5KilfM33xy 2bLH8bH5VsE5Z1uMLL0VabOiCHBa4jYubukfrSWTJlupyXUpvbsHiYQMRwHt/Vlq675T uccteV+cp1VIm+2+khpD0riupgW/qQC85hBUG+abwX8HDOs5ClXNHCCxiQ41AEA6vTIK RAIhPvbabPduYaK8CEa7V/zHxyrX8b2PfoKRRQM+uEptbJPRZeelXL4AMVc+3MjCPnbz zhZZJkpObguE1zqmXWdox4utqFrCsJQ7OaQWxr/Ch9aqQ1/9+ywKIqj69ZFjvCj2xsow 9wtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=4FVEMGAeC4A4acfilWsGklHz88eR5z5EWRCCV9Kst0I=; fh=GzqCeLE/xUiMrHbuPE6c6k8havs3wJ70gaRF1fU6n78=; b=Z6+JVXV/I8e4tOBzA+s1cuUCG4cJ1WQg7Vy3Vd0qDzaHs06nXq0xtG/m/bnSwY5W+Y HHpoztg5SfgTLoicqN3oVjA/uXeJJtOp1546Wbg+lYK3UA48/YEX4p/5sY68r0eueDD7 g5xQXt+ojK9OujS+Nm8q1MthTTwkm4YULW2qZF/o1lwDVyfh1vLD5cq0yioBxgH1PXDq ollZxciAAdQefjnA4wWlq1UI7oKyz1HkxBTbbiczHTrdnNB0duz+epT128FxxgoBArSV mcx9VDJH//gA63hU+EUjLJozU4Q/sHIMaVm7iocpI10OB3yDTB0wCdFCTKAXXgB+uvux RpIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20221208.gappssmtp.com header.s=20221208 header.b=0Q1tzUOb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=networkplumber.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f11-20020a170906824b00b00992aea2c6a6si2992832ejx.977.2023.07.19.11.00.14; Wed, 19 Jul 2023 11:00:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@networkplumber-org.20221208.gappssmtp.com header.s=20221208 header.b=0Q1tzUOb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=networkplumber.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230072AbjGSR5Z (ORCPT + 99 others); Wed, 19 Jul 2023 13:57:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbjGSR5T (ORCPT ); Wed, 19 Jul 2023 13:57:19 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA8591FE9 for ; Wed, 19 Jul 2023 10:57:14 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1b9cdef8619so46247655ad.0 for ; Wed, 19 Jul 2023 10:57:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1689789434; x=1690394234; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=4FVEMGAeC4A4acfilWsGklHz88eR5z5EWRCCV9Kst0I=; b=0Q1tzUOb9vYJXHmPeDryrYB5A4pEESrmEqXYj9Hg+90Z5+QCPv2ecrkofZgQVHrh2Q 2SmV6ESktQAtsjCYVJZhJojTRHsrQLvYLqNH0EoTgXcN4+EyUGH6ZSXKFYb02Y0hiirh icie1/r4QjaO+Xr/8VrDJJ+t8iIcRUo2snH46DM7aXAbB12rMZS46rJ2h5Z2q3coLAKN GMT7GgUwcUUW4SpZr+6zG8X6fnKROWImTBv7u2v/1CdFXwNuMSzJvhzr6uNXEVsoU8p0 jr3ynj+/29rinW5TGGhTFa+uF7yLH222PS2w2a9Iu7qAlX2Am1gjapUEui6PcMe/HT1i pwCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689789434; x=1690394234; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4FVEMGAeC4A4acfilWsGklHz88eR5z5EWRCCV9Kst0I=; b=H/jKqny8KKakT+H4imC11VvUP7BntKdrT5L1bObrZAqrhDTeEnCQOvCOobbBv/nvBd BLHe60VRzXDPL9HHpiQr1pTPKq+2n5/e/rVSUttPqc9qxZtRSyzUUVgslwtK2eRYbhch NYUMYfxayUHac/P/fMBbBUhpwXmjrY6o0g3JJOBsT/5pgjDJITAgKhxY+aRWGWgZj/QY ikzINV3mO4qSjx4SJvvphu/3vZYcsMTD/yzIwEukFeTHkzfjXgcx2dVUIgHyxgtVhgkn cStPg177GZ6cj4ePAUp8ighh8nMrv8Xx4ndmk7qCsmnVXmnRUzQaIdDSIEvoJzofLJeW WYMw== X-Gm-Message-State: ABy/qLZR9fKzhhwlINEEUpBz5LRY3FqBPfXW4I2ScUsBNdPuENk25dA/ 0PL8lgNpah6l6hXyjzGWJ2Ycdw== X-Received: by 2002:a17:90a:d598:b0:264:97a:2ba6 with SMTP id v24-20020a17090ad59800b00264097a2ba6mr4560333pju.7.1689789434001; Wed, 19 Jul 2023 10:57:14 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id nw17-20020a17090b255100b00263f41a655esm1415304pjb.43.2023.07.19.10.57.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 10:57:13 -0700 (PDT) Date: Wed, 19 Jul 2023 10:57:11 -0700 From: Stephen Hemminger To: Mina Almasry Cc: Jakub Kicinski , David Ahern , Jason Gunthorpe , Andy Lutomirski , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, netdev@vger.kernel.org, linux-arch@vger.kernel.org, linux-kselftest@vger.kernel.org, Sumit Semwal , Christian =?UTF-8?B?S8O2bmln?= , "David S. Miller" , Eric Dumazet , Paolo Abeni , Jesper Dangaard Brouer , Ilias Apalodimas , Arnd Bergmann , Willem de Bruijn , Shuah Khan Subject: Re: [RFC PATCH 00/10] Device Memory TCP Message-ID: <20230719105711.448f8cad@hermes.local> In-Reply-To: References: <20230710223304.1174642-1-almasrymina@google.com> <12393cd2-4b09-4956-fff0-93ef3929ee37@kernel.org> <20230718111508.6f0b9a83@kernel.org> <35f3ec37-11fe-19c8-9d6f-ae5a789843cb@kernel.org> <20230718112940.2c126677@kernel.org> <20230718154503.0421b4cd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 19 Jul 2023 08:10:58 -0700 Mina Almasry wrote: > On Tue, Jul 18, 2023 at 3:45=E2=80=AFPM Jakub Kicinski = wrote: > > > > On Tue, 18 Jul 2023 16:35:17 -0600 David Ahern wrote: =20 > > > I do not see how 1 RSS context (or more specifically a h/w Rx queue) = can > > > be used properly with memory from different processes (or dma-buf > > > references). =20 >=20 > Right, my experience with dma-bufs from GPUs are that they're > allocated from the userspace and owned by the process that allocated > the backing GPU memory and generated the dma-buf from it. I.e., we're > limited to 1 dma-buf per RX queue. If we enable binding multiple > dma-bufs to the same RX queue, we have a problem, because AFAIU the > NIC can't decide which dma-buf to put the packet into (it hasn't > parsed the packet's destination yet). >=20 > > > When the process dies, that memory needs to be flushed from > > > the H/W queues. Queues with interlaced submissions make that more > > > complicated. =20 > > =20 >=20 > When the process dies, do we really want to flush the memory from the > hardware queues? The drivers I looked at don't seem to have a function > to flush the rx queues alone, they usually do an entire driver reset > to achieve that. Not sure if that's just convenience or there is some > technical limitation there. Do we really want to trigger a driver > reset at the event a userspace process crashes? Naive idea. Would it be possible for process to use mmap() on the GPU memory and then do zero copy TCP receive some how? Or is this what is being proposed.