DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Pavan Nikhilesh <pbhagavatula@marvell.com>
Cc: Jerin Jacob <jerinj@marvell.com>,
	Shijith Thotton <sthotton@marvell.com>, dpdk-dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/2] event/cnxk: add Rx adapter vector support
Date: Sun, 13 Jun 2021 18:48:39 +0530	[thread overview]
Message-ID: <CALBAE1P8+92qRbT_QS_S7aiY_qYw2qwOHv=WWsqsiHHOF-7HPQ@mail.gmail.com> (raw)
In-Reply-To: <20210524130617.1621-1-pbhagavatula@marvell.com>

On Mon, May 24, 2021 at 6:36 PM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Add event vector support for cnxk event Rx adapter, add control path
> APIs to get vector limits and ability to configure event vectorization
> on a given Rx queue.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

> +
> +static int
> +cn10k_sso_rx_adapter_vector_config(
> +       const struct rte_eventdev *event_dev, const struct rte_eth_dev *eth_dev,
> +       int32_t rx_queue_id,
> +       const struct rte_event_eth_rx_adapter_event_vector_config *config)
> +{
> +       struct cnxk_eth_dev *cnxk_eth_dev;
> +       struct cnxk_sso_evdev *dev;
> +       int i, rc;
> +
> +       rc = strncmp(eth_dev->device->driver->name, "net_cn10k", 8);
> +       if (rc)
> +               return -EINVAL;
> +
> +       dev = cnxk_sso_pmd_priv(event_dev);
> +       cnxk_eth_dev = cnxk_eth_pmd_priv(eth_dev);
> +       if (rx_queue_id < 0) {
> +               for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
> +                       cnxk_sso_updt_xae_cnt(dev, config->vector_mp,
> +                                             RTE_EVENT_TYPE_ETHDEV_VECTOR);
> +                       rc = cnxk_sso_xae_reconfigure(
> +                               (struct rte_eventdev *)(uintptr_t)event_dev);
> +                       rc = cnxk_sso_rx_adapter_vwqe_enable(
> +                               cnxk_eth_dev, eth_dev->data->port_id, i,
> +                               config->vector_sz, config->vector_timeout_ns,
> +                               config->vector_mp);
> +                       if (rc)
> +                               return -EINVAL;
> +               }

See below

> +       } else {
> +
> +               cnxk_sso_updt_xae_cnt(dev, config->vector_mp,
> +                                     RTE_EVENT_TYPE_ETHDEV_VECTOR);
> +               rc = cnxk_sso_xae_reconfigure(
> +                       (struct rte_eventdev *)(uintptr_t)event_dev);
> +               rc = cnxk_sso_rx_adapter_vwqe_enable(
> +                       cnxk_eth_dev, eth_dev->data->port_id, rx_queue_id,
> +                       config->vector_sz, config->vector_timeout_ns,
> +                       config->vector_mp);
> +               if (rc)
> +                       return -EINVAL;
> +       }

Parameterize and move this separate function to avoid code duplication.

> +
> +       return 0;
> +}
> +


# Add update this feature in doc/guides/eventdevs/cnxk.rst.
# Please add a new section in the release not for the enhancement of
event cnxk driver and add new feature there
as you update the feature in code.

      parent reply	other threads:[~2021-06-13 13:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24 13:06 pbhagavatula
2021-05-24 13:06 ` [dpdk-dev] [PATCH 2/2] event/cnxk: add Rx event vector fastpath pbhagavatula
2021-06-13 13:14   ` Jerin Jacob
2021-06-13 13:18 ` Jerin Jacob [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALBAE1P8+92qRbT_QS_S7aiY_qYw2qwOHv=WWsqsiHHOF-7HPQ@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=pbhagavatula@marvell.com \
    --cc=sthotton@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).