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 C6B94A0A0C; Sun, 13 Jun 2021 15:18:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E3854003F; Sun, 13 Jun 2021 15:18:57 +0200 (CEST) Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) by mails.dpdk.org (Postfix) with ESMTP id 14BAE4003E for ; Sun, 13 Jun 2021 15:18:56 +0200 (CEST) Received: by mail-io1-f43.google.com with SMTP id b14so21711400iow.13 for ; Sun, 13 Jun 2021 06:18:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fYwq39EWhrA/R88hzTwwLB6PZUcz8Z66AMORaIlfgBg=; b=DJmLSDQzk3o6T4w8RLtISmri19kbp2xnyfOqZ2b42Mo2J2ppdN+vv0r7qTbbMnEWBu e7KXpCtyEqjkGH+kqgTzP0jXRAg5SKtHpbt6JdTN2aO4XO5AtFdD4POX5qLkuDE7BU1M YT30eKu3P2vrivr+r7ku2UVNpLcWqkpmmukmNeTOjVyHl9u8rmtyT+XLJ9BIlqMHeJrp K5BD9AhkChdTwef5Gm4eZdVcynmaLTV048eNJnRtAiVloOIuy8NU7cxkzWGjTOcVDwk0 b0lCxEVFbYRxHykm3D/tJ/UA9Tg9fVndzBZtFlQLJ3V7WKP3GQNJOVfmRq8lkddq3MLz 2+ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fYwq39EWhrA/R88hzTwwLB6PZUcz8Z66AMORaIlfgBg=; b=SiyTMYtHqDpWo09SWG6gs73eylS2w9TNFRDtkTRTSl70d6DhXNNxgxX0vlszXYZqfp Fs2mIc0Jp448EmmhC2rYqpgrTEHfVCgIlTMBa/CM3YycnjP3urISG9zBslRfXvVRaV0C xb2D/ouZM7rk/nBO8GqTugH6zKaJWrrxArPIKmXYo94SCiw+RaOZ7vOmLNHqJz66lQe1 rzsH3rBMT6SP70HgHUMikWjx/LkmnQSk8GaL7w/wsomwCZ5ukxPPUsqQQ+VOcJCiamEi 8RxuAIxkjVtbcoCbs1lgElB1cFdutj56Ws6O+39SP+HdEAW4IzedWI0GK2J0qC+cYqU3 yolg== X-Gm-Message-State: AOAM533dWOJ1NT7MsTpifX17rJjgXZZsvXhiiWxKJFnJHBrr/zJkIkZt mjR2+H4wMANdH7g0avclb/F6HIho5zmp453Y+W8= X-Google-Smtp-Source: ABdhPJzSzfmI7SbLR5gxrJ3c2djt8E2T0885TtUrwgiBFzQ7Ym9g2qX8m/FzIiqZAgymvQ9XUtr4dqxOrz7U8XZ+pys= X-Received: by 2002:a6b:c984:: with SMTP id z126mr10910762iof.94.1623590335463; Sun, 13 Jun 2021 06:18:55 -0700 (PDT) MIME-Version: 1.0 References: <20210524130617.1621-1-pbhagavatula@marvell.com> In-Reply-To: <20210524130617.1621-1-pbhagavatula@marvell.com> From: Jerin Jacob Date: Sun, 13 Jun 2021 18:48:39 +0530 Message-ID: To: Pavan Nikhilesh Cc: Jerin Jacob , Shijith Thotton , dpdk-dev Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 1/2] event/cnxk: add Rx adapter vector support 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 Sender: "dev" On Mon, May 24, 2021 at 6:36 PM wrote: > > From: Pavan Nikhilesh > > 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 > + > +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.