From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0D6AC433AB; Thu, 23 Nov 2023 15:50:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F26A642F76; Thu, 23 Nov 2023 15:50:51 +0100 (CET) Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) by mails.dpdk.org (Postfix) with ESMTP id 3779B42F73 for ; Thu, 23 Nov 2023 15:50:50 +0100 (CET) Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-77d631aab99so48197185a.2 for ; Thu, 23 Nov 2023 06:50:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700751049; x=1701355849; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Ir7NFaVAWcUAhTyEj7Dz3xWq2T6hacJddlifn0vI7jU=; b=YR8wjmtx2q1iRGOwauTPoa9AWNK9JtEHtWNytacWS1BxU15a7JfOvf6ndgaorqB3gt 01Rnm1Lig+82tLRcAphQgOCNCj8JL7D5qpA/3uDPhaPPdDva4NYaSkQ9R8awbZ8Oyr06 ae5qoMVCjAvCJzGjZBKuuLWNFspZu3ixE+kMyuQEkN/DEB/d+C9UvSlZVP+/1BTb1RnS Dbzp9LllLpOZt75XRbnOL90lDZpBGSFA/cTxX/gL43iTOxpjTkZQAoch6rCHQA0xiIVZ ocDDhVB3ZLz+xZoL8KMNYDVAtgm2jp9dPX+lwwgn+bC1PoHm3jsKptGfgTkzXo8RR6D0 iyxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700751049; x=1701355849; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ir7NFaVAWcUAhTyEj7Dz3xWq2T6hacJddlifn0vI7jU=; b=ovUR9UqBHyJzA3C5r83Por+3ex4ysASfDIvoOqia+ZI4JFOfv8olnm3sIjnE5MQueH jDm/F/ZWIltimf1So5P+9jhCL/RobRDZMiu12rPzKC3V7mrLEmDKwq4wts9gKQaaPl32 +lUaegX/wHS8sJtcoiSBkDNn2teNJ/n5UVFfWtnFbGNbpJYL3qv6heGjpxponYQDLQxf D7w6IN1cLqDol5okL0A7djUOsWg8W3kRmCyVpFPxkSfNfQQ4uIOPNGpqarCKVn5v448U PUX/cHqFtkAaG3+dg8wLKDAxghOEeS+4/Vu0BR2oWrTJmKGwcva0TwVkcf7VEAxqIWxv 0byg== X-Gm-Message-State: AOJu0YyISj1122zXHJ7DwTNEiT1ODBc21FlK1lkmTmoB9lKQiL6qN06E ru4mf5/Ass5pcUpAdwuDDEQL+aDrrP4bmolvU1BIfn8Aw/J2Gw== X-Google-Smtp-Source: AGHT+IEfBSy09+d6yIc/E52aGAHgY+7VUGY9DP73jOFxMD5nobQCcrYL+jfEmFI/Eg6VxLxDDdps2tlG/gvQhMhk+gs= X-Received: by 2002:ac8:7f0f:0:b0:41e:2d8e:b364 with SMTP id f15-20020ac87f0f000000b0041e2d8eb364mr6714853qtk.53.1700751049566; Thu, 23 Nov 2023 06:50:49 -0800 (PST) MIME-Version: 1.0 References: <20230922081912.7090-1-bruce.richardson@intel.com> <20230922081912.7090-2-bruce.richardson@intel.com> In-Reply-To: <20230922081912.7090-2-bruce.richardson@intel.com> From: Jerin Jacob Date: Thu, 23 Nov 2023 20:20:23 +0530 Message-ID: Subject: Re: [RFC PATCH 1/5] bus: new driver to accept shared memory over unix socket To: Bruce Richardson Cc: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, Sep 22, 2023 at 1:49=E2=80=AFPM Bruce Richardson wrote: > > Add a new driver to DPDK which supports taking in memory e.g. hugepage > memory via a unix socket connection and maps it into the DPDK process > replacing the current socket memory as the default memory for use by > future requests. > > Signed-off-by: Bruce Richardson Thanks Bruce for this work. IMO, This will open up a lot of use cases like CPU based offload on different process. > + > +enum shared_mem_msg_type { > + MSG_TYPE_ACK =3D 0, > + MSG_TYPE_MMAP_BASE_ADDR, > + MSG_TYPE_MEMPOOL_OFFSET, > + MSG_TYPE_RX_RING_OFFSET, > + MSG_TYPE_TX_RING_OFFSET, > + MSG_TYPE_START, > + MSG_TYPE_GET_MAC, > + MSG_TYPE_REPORT_MAC, > +}; In order to cater to different use cases, IMO, drivers/bus/shared_mem/ should be generic and act only as transport for communicating with other process. That would translate to the following 1) drivers/bus/shared_mem/ provides means to register message type and its callback 2) The consumers(drivers/mempool/shared_mem and drivers/net/sharedmem) register the the callback. Definition the callback and message type should be in consume= r. Also, We may change the bus/sharedmem to bus/socket or so, to limit the scope of bus driver as communion mechanism to talk to different process. That way there can different DPDK driver can based on socket bus in the future.