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 27AA8A04A9; Mon, 27 Dec 2021 19:01:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B3FF74067B; Mon, 27 Dec 2021 19:01:58 +0100 (CET) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mails.dpdk.org (Postfix) with ESMTP id 8513D40040 for ; Mon, 27 Dec 2021 19:01:57 +0100 (CET) Received: by mail-pf1-f175.google.com with SMTP id m1so14201223pfk.8 for ; Mon, 27 Dec 2021 10:01:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fNPhhYfxGj34T+mNFdTnJVbXj4CH0KttUGxyxQh4YQQ=; b=wXcY6v32PVuE/FbFkrIYWzuYGEy1ahxXGkS45FO3q5vWpOEcpM+OkCOFsj/eaba0KP MK349XXzNS3NbxDMw963XEMrT7ct54ldhuxA5vZQOTV57/LWi1vip/N7kj4G7mQjZGws J4y/yjXMSYb9Rqg9RyDpSgJQ3KlOr+/aqf+A014FO5MA9mzpsALnnVHyUEIf7FxiV3Hb rkFcSxdbQ7QdUEjUUnO3JaMsWV5BEInaolXFpjisLNeFFQfDOe+EvvCrDpmxZQG7/5h/ 7cRpXNLsR1u4q5XDBaMfi1I8PLss+DnsXvBq3oyqz3PY9bIKr9aN6/FndYFXhFCxgnKc RM5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fNPhhYfxGj34T+mNFdTnJVbXj4CH0KttUGxyxQh4YQQ=; b=MTHvhfceCzZ6Jkf/V5Npey2dkSZFC9Z59wrzd1Lt7VFLZi2460KlazwiKWLFutLAMM W/h7BAaQrzD2xgibkOctEzZXysC900+2Ft6mCgigFpYdzOk31uA+thEajHGhRUEOiHvy UGXBPCGWbXkS8sA7PyjHIQxp171JyJJZ/hibDiAGbz67QFP3rfA/7GADiD7b+uEC9Tiq p1+WHz77UJ0f0W1S0L/IvdRI0RYwWlOmoSeQ9ObwcMEl5B3XgeEnLlbGPGOtkio8ziaE CvwsqYVeO8ybBBGjfUF6IhGqVmF/9+GYXCk+Y6Kw4tgyUbj+5uXKv4NFklpoyXev1LUq CyyQ== X-Gm-Message-State: AOAM532fKHL3c1SaDhtcdNmNVQ8vWKKz5UCGyu+iVHI0zsWeZLZy6p9k q8hA04M8kRYoup/R6C6Ikl7gUg== X-Google-Smtp-Source: ABdhPJzM7hZ7LIBtKVVACH9St7lWMbL93r39YxXm4KTSS4g07ssEbhv1Ox3KH0ZfN5Cm6I2BgiVu7Q== X-Received: by 2002:aa7:8d49:0:b0:4bb:3355:8fca with SMTP id s9-20020aa78d49000000b004bb33558fcamr18737172pfe.8.1640628116759; Mon, 27 Dec 2021 10:01:56 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id m16sm18460613pfk.32.2021.12.27.10.01.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Dec 2021 10:01:56 -0800 (PST) Date: Mon, 27 Dec 2021 10:01:54 -0800 From: Stephen Hemminger To: nipun.gupta@nxp.com Cc: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com, hemant.agrawal@nxp.com, Jun Yang Subject: Re: [PATCH v2 06/16] net/dpaa2: support multiple txqs en-queue for ordered Message-ID: <20211227100154.15da0346@hermes.local> In-Reply-To: <20211227161645.24359-7-nipun.gupta@nxp.com> References: <20211206121824.3493-1-nipun.gupta@nxp.com> <20211227161645.24359-1-nipun.gupta@nxp.com> <20211227161645.24359-7-nipun.gupta@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Mon, 27 Dec 2021 21:46:35 +0530 nipun.gupta@nxp.com wrote: > @@ -1003,16 +1003,20 @@ dpaa2_eventdev_txa_enqueue(void *port, > struct rte_event ev[], > uint16_t nb_events) > { > - struct rte_mbuf *m = (struct rte_mbuf *)ev[0].mbuf; > + void *txq[32]; > + struct rte_mbuf *m[32]; You are assuming nb_events <= 32. Why not size the array based on nb_events. > uint8_t qid, i; > > RTE_SET_USED(port); > > for (i = 0; i < nb_events; i++) { > - qid = rte_event_eth_tx_adapter_txq_get(m); > - rte_eth_tx_burst(m->port, qid, &m, 1); > + m[i] = (struct rte_mbuf *)ev[i].mbuf; Why the cast? it is already the right type. > + qid = rte_event_eth_tx_adapter_txq_get(m[i]); > + txq[i] = rte_eth_devices[m[i]->port].data->tx_queues[qid];