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 BB43C43155; Fri, 13 Oct 2023 14:15:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 91B4B402D3; Fri, 13 Oct 2023 14:15:20 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id D20DD402CF for ; Fri, 13 Oct 2023 14:15:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697199319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YO6GaFpi6rYg9gF3R575Ja9GeR/j/vsR6sO3Ug/8fqY=; b=P8zTr+zTEGBhSa0Tmu6pr+OdPdUuFtbD1blzZygzJTOvk1jIzIiQDG6WamNmJA9qkO1W/F ZNJMrz1sAIKYPm1swCFecPl+TnpgOl8KTEKVWRNtkQ7mW8YXuRAKT0IT6Fl/4FO/LM2dNW 79AIRNimdgkasl9cxFlP0kGAGFE3JPk= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-421-Qto-EPZMOAGQP_CMXHfZ-w-1; Fri, 13 Oct 2023 08:15:18 -0400 X-MC-Unique: Qto-EPZMOAGQP_CMXHfZ-w-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2c50234741eso10914971fa.1 for ; Fri, 13 Oct 2023 05:15:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697199316; x=1697804116; 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=YO6GaFpi6rYg9gF3R575Ja9GeR/j/vsR6sO3Ug/8fqY=; b=HGCiZS4VgsCrhImE//UnDtFsyetbYD89xcPB9UsCh0ZXXOBe3i0r0H5Vn50SjGPlKD ULwpGw4HnkfvB6/uzKvTwgJP9nOz+DUpXdAsMT4dVZ1dSHIZkF24t7GlZyfxVcnwiQwK MrlMeRNjEcIctesaapSaxnOY0xaXMsEQ1FqhPy+L0s3PfPH3YP5i1qCCHUuBeKTT4wE7 0KbHJ3wdq0MOIQaHD5XesSko7ymfeP5e0HVwcHSHaqffhe12uSZ6NFzRz5cOiUk/c/sq +cqs6IuJc/5weJG0KmZV649+mGVf2xS9ssUb1IgDWvnPUh+F2xecTPivcMhSyaKu633U LfSA== X-Gm-Message-State: AOJu0YxLz+WZOfyzy1XN47ycYi5xf2/U+wbAWqxu4n55Y1FoQV35zKgY ylZ580eu9AEzrMEUyzT0O1K0QbqetR6linfS7OwrvVBYbRVfxvBYnYJAaufSP0GMsd90xOkL/MZ 3uh7fuJTEFY8yYDACSqw= X-Received: by 2002:a2e:6a10:0:b0:2bc:efa4:2c32 with SMTP id f16-20020a2e6a10000000b002bcefa42c32mr20015338ljc.37.1697199316671; Fri, 13 Oct 2023 05:15:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEeLS2oq5aGD8m9mqoJapgUHEbOJVdfjnU70EDqtIR3bbAXc1hisuCIkEaURGtx19k0YhippReKzWCEfdACqMI= X-Received: by 2002:a2e:6a10:0:b0:2bc:efa4:2c32 with SMTP id f16-20020a2e6a10000000b002bcefa42c32mr20015327ljc.37.1697199316361; Fri, 13 Oct 2023 05:15:16 -0700 (PDT) MIME-Version: 1.0 References: <20230705065235.4767-1-abhijit.gangurde@amd.com> <20230711055147.872889-1-abhijit.gangurde@amd.com> In-Reply-To: From: David Marchand Date: Fri, 13 Oct 2023 14:15:04 +0200 Message-ID: Subject: Re: [PATCH v3] bus/cdx: provide driver flag for optional resource mapping To: "Gangurde, Abhijit" Cc: "Gupta, Nipun" , "Agarwal, Nikhil" , "dev@dpdk.org" , "Yigit, Ferruh" , "thomas@monjalon.net" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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, Oct 13, 2023 at 1:52=E2=80=AFPM Gangurde, Abhijit wrote: > > > > > > +/** > > > > > + * Map the CDX device resources in user space virtual memory add= ress. > > > > > + * > > > > > + * Note that driver should not call this function when flag > > > > > + * RTE_CDX_DRV_NEED_MAPPING is set, as EAL will do that for > > > > > + * you when it's on. > > > > > > > > Why should we export this function in the application ABI, if it is > > > > only used by drivers? > > > > > > This can be called from an application as well if this flag is not se= t hence, we > > need to export this function. > > > > What kind of applications / in which usecase, one would need to map > > the device resources? > > Except a driver? > > I understand that it is probably not the ideal use case, but some of the = customers > are using a single application which also registers itself as driver. Pro= bably such > applications need to use internal APIs instead of making these APIs exter= nal. > Will analyze it further and send another rev of this patch. External drivers should be supported with current code. DPDK must be built with enable_driver_sdk option, and the external driver code can include bus_cdx_driver.h. Possibly compiling this code with -DENABLE_INTERNAL_API cflag will be neces= sary. --=20 David Marchand