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 2C192425B7; Wed, 27 Sep 2023 20:20:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A4CF840271; Wed, 27 Sep 2023 20:20:49 +0200 (CEST) Received: from mail-ua1-f48.google.com (mail-ua1-f48.google.com [209.85.222.48]) by mails.dpdk.org (Postfix) with ESMTP id C71C94026B for ; Wed, 27 Sep 2023 20:20:48 +0200 (CEST) Received: by mail-ua1-f48.google.com with SMTP id a1e0cc1a2514c-7ab1729f5cdso4816471241.2 for ; Wed, 27 Sep 2023 11:20:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695838848; x=1696443648; 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=8zjg1XLiYIsOF6o7fM3fY4GwENuQdh7TwWl4Sba2bSk=; b=nKuDZKHuFpdjoU0iNnh51fmNG5neex8hGCABOdRIk+1mc8+DtkcYxf/3XA0UB93SlX VcSDdio24sz0bV7WTWXAYPKGtuHDbrX401qiwzrNx6BqPp9pnzvxQJwAVjVhUdj7B7Wu WSQkQP+UwF/zZh+7/LoOnalfxV55ltT4pTPqeiZ1WcFJoITBvp/JqJzcrDFPixZbAWKx 0inq8MWVwR4BUmgR9gqqyJJPQ8HnP1mWcWKwr3Zs3EONowvp2IGxYGB+gx5uerJh40ev 3oAkMDREMK+mBbk8kDc84jxbvQLiFSpXkWH3BCGOeVdEQNNcmjqTqwUSpjEZSdP+ovsp qiLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695838848; x=1696443648; 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=8zjg1XLiYIsOF6o7fM3fY4GwENuQdh7TwWl4Sba2bSk=; b=GDhliiTKH+YiwIk+T9qb3tm4dzj7kxQEVGPCOgN080ShIPUExPoHiRcQ5ZVtG0Qvir j37Tfh1K0ORiMfz8ijWCh/p04EpIw5TkUU2NFID1stPVaRXZpi9qHqC66Fwb7OGFdzNL LHcVydMupRN1/lVHY/qb7sB0i3nKVZ4U+eD9DKDM+Qo0Y6mjxayzsTSQQv/6Fn3OWofc GJhPKhX9abmjmKE/7Qxw6r0YA3DCFuI1Inlg6Ma0R8TVcNZngubnSp9Nf2LvQJu4m+iX k138M1SyfGkTA25STy/f8fR9W1gkFSM9r5pwAhpqqR+NMyyX1xSTW5WpUgZMI8UxoNbC nG/w== X-Gm-Message-State: AOJu0YwKrNXqnJqF4IHe1tnc3FXVwuUlqarZRpoclNab4cD8s/1WoS6o ntaqyIVpmtz3lp8gGbkzyvgdUxsaYuhHyK4gK5k= X-Google-Smtp-Source: AGHT+IFPnS5yIceJv1nIbUz/b/syH+qNS9ym8kaoWwqObJUDcvywRatEKDM/fFrIIkQ4bF/XX7taNyhFl3J58xe01mQ= X-Received: by 2002:a05:6102:34ec:b0:452:d87d:81e7 with SMTP id bi12-20020a05610234ec00b00452d87d81e7mr2577410vsb.9.1695838847972; Wed, 27 Sep 2023 11:20:47 -0700 (PDT) MIME-Version: 1.0 References: <20230923133449.3780841-1-amitprakashs@marvell.com> <20230926103233.3956431-1-amitprakashs@marvell.com> <20230926103233.3956431-3-amitprakashs@marvell.com> In-Reply-To: <20230926103233.3956431-3-amitprakashs@marvell.com> From: Jerin Jacob Date: Wed, 27 Sep 2023 23:50:21 +0530 Message-ID: Subject: Re: [PATCH v4 02/12] eventdev: api to get DMA adapter capabilities To: Amit Prakash Shukla Cc: Jerin Jacob , dev@dpdk.org, fengchengwen@huawei.com, kevin.laatz@intel.com, bruce.richardson@intel.com, conor.walsh@intel.com, vattunuru@marvell.com, g.singh@nxp.com, sachin.saxena@oss.nxp.com, hemant.agrawal@nxp.com, cheng1.jiang@intel.com, ndabilpuram@marvell.com, anoobj@marvell.com, mb@smartsharesystems.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 Tue, Sep 26, 2023 at 4:03=E2=80=AFPM Amit Prakash Shukla wrote: > > Added a new eventdev API rte_event_dma_adapter_caps_get(), to get > DMA adapter capabilities supported by the driver. Patches from 2: Keep following heading template eventdev/dma: support ... example: eventdev/dma: support adapter capabilities get > Signed-off-by: Amit Prakash Shukla > --- > lib/eventdev/meson.build | 2 +- > lib/eventdev/rte_eventdev.c | 23 +++++++++++++++++++++++ > lib/eventdev/rte_eventdev.h | 2 +- > lib/meson.build | 2 +- > 4 files changed, 26 insertions(+), 3 deletions(-) > > diff --git a/lib/eventdev/meson.build b/lib/eventdev/meson.build > index 21347f7c4c..b46bbbc9aa 100644 > --- a/lib/eventdev/meson.build > +++ b/lib/eventdev/meson.build > @@ -43,5 +43,5 @@ driver_sdk_headers +=3D files( > 'event_timer_adapter_pmd.h', > ) > > -deps +=3D ['ring', 'ethdev', 'hash', 'mempool', 'mbuf', 'timer', 'crypto= dev'] > +deps +=3D ['ring', 'ethdev', 'hash', 'mempool', 'mbuf', 'timer', 'crypto= dev', 'dmadev'] > deps +=3D ['telemetry'] > diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c > index 6ab4524332..60509c6efb 100644 > --- a/lib/eventdev/rte_eventdev.c > +++ b/lib/eventdev/rte_eventdev.c > @@ -20,6 +20,7 @@ > #include > #include > #include > +#include > #include > #include > > @@ -224,6 +225,28 @@ rte_event_eth_tx_adapter_caps_get(uint8_t dev_id, ui= nt16_t eth_port_id, > : 0; > } > > +int > +rte_event_dma_adapter_caps_get(uint8_t dev_id, uint8_t dma_dev_id, uint3= 2_t *caps) > +{ > + struct rte_eventdev *dev; > + > + RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > + if (!rte_dma_is_valid(dma_dev_id)) > + return -EINVAL; > + > + dev =3D &rte_eventdevs[dev_id]; > + > + if (caps =3D=3D NULL) > + return -EINVAL; > + > + *caps =3D 0; > + > + if (dev->dev_ops->dma_adapter_caps_get) > + return (*dev->dev_ops->dma_adapter_caps_get)(dev, dma_dev= _id, caps); > + > + return 0; > +} > + > static inline int > event_dev_queue_config(struct rte_eventdev *dev, uint8_t nb_queues) > { > diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h > index 2c6ecc7f8f..41743f91b1 100644 > --- a/lib/eventdev/rte_eventdev.h > +++ b/lib/eventdev/rte_eventdev.h > @@ -1504,7 +1504,7 @@ rte_event_crypto_adapter_caps_get(uint8_t dev_id, u= int8_t cdev_id, > */ > __rte_experimental > int > -rte_event_dma_adapter_caps_get(uint8_t dev_id, int16_t dmadev_id, uint32= _t *caps); > +rte_event_dma_adapter_caps_get(uint8_t dev_id, uint8_t dmadev_id, uint32= _t *caps); Squash this to first patch.