From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3947CA3160 for ; Fri, 11 Oct 2019 08:14:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DE8EC1E93F; Fri, 11 Oct 2019 08:14:20 +0200 (CEST) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by dpdk.org (Postfix) with ESMTP id 409161E93C for ; Fri, 11 Oct 2019 08:14:20 +0200 (CEST) Received: by mail-io1-f67.google.com with SMTP id z19so19200804ior.0 for ; Thu, 10 Oct 2019 23:14:20 -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=pejoW89KUNPk2wZ5WuG5+xJIgUCN6CSveMpyb5xccb0=; b=eeGwyS5qAVyM79KAhxhvaAZAoQCdYQF90IaY2rDHYXh735+5frmNhk3QVcEZk40HVT bKRcnoyMjz0sz1HmknW/em0sneUQxQer+N1qZe4Nt9M1vaw2CJ2QM6Mg2gWo1Z+TZiRt jhPZ6Mz7HvpDT3rGJXeNAiSyPTNjHJqu4okQOnNblL/t/1R0Lbp4uF42JbmCtsflofpY E4ZYGha0EOkcI6ggZwFQxw9e7KM+QTkOwV3TiCORjws0n1431hM9J+eSdHFgO7ypQmxO o8j8X0icGU8XIbIJvjd030ORcFCzpUfCH+Wsr96fV96QuB6SzLi8SDwqeQOPJ5v+PrVE 6tsg== 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=pejoW89KUNPk2wZ5WuG5+xJIgUCN6CSveMpyb5xccb0=; b=nGgE0HCR9lUySh26vWa8jA1C3cNPoWjpBikDH8TA0bY12gj+GUCdg/DPVhYqDkHDqo lROOkwbTUVhuqLe4pWNwHbdpxXNSmpI7YfBPcaMB+r+La3WMKyFoul6F70F4AtN7USTn QrjCnCYQO8TNMwq7Uekb9ZqFoULrwtxm7Gdo2X60PNJEZapkr4QsuELB0ti+rX/V3uHv n3ihcI/TciJAwOmcDy+qMRcqDIbiGY29+DX+azz0lfNW1YRSchL5+z2/LxQbpk00dtSv QvdAc8mJjH8GCF5XQ8CCoTnLNFBiwd4OJdxns3739fFZSByos734pBmDKFxl9qSTZIyy 46Mg== X-Gm-Message-State: APjAAAUEXILF58qz6xwhdM73kCHu8YnR8hTOSWyS1hE4Ji6AaRtgKZsf 4+nWbrFbQXICUf9vfhi5aC9FfF4mZtTiXp6qXjg= X-Google-Smtp-Source: APXvYqyY5WpcYmckC+XutjkETtCekk9ot7Vgd8W3RdMfKixZTVWm5lpC4LNwIeP1JFA6AqqSo3h5E9/UCq8NlY6+atc= X-Received: by 2002:a02:6d08:: with SMTP id m8mr15922048jac.34.1570774459179; Thu, 10 Oct 2019 23:14:19 -0700 (PDT) MIME-Version: 1.0 References: <20191001064641.28404-1-nipun.gupta@nxp.com> <20191009073236.32661-1-nipun.gupta@nxp.com> <1F668163772FA946975B9466A9DFF729EDEE4BAD@ORSMSX122.amr.corp.intel.com> In-Reply-To: From: Jerin Jacob Date: Fri, 11 Oct 2019 11:44:07 +0530 Message-ID: To: Nipun Gupta Cc: "Rao, Nikhil" , "dev@dpdk.org" , "jerinj@marvell.com" , "aconole@redhat.com" , "pbhagavatula@marvell.com" , "skori@marvell.com" , Hemant Agrawal , "Richardson, Bruce" , "Kovacevic, Marko" , "orika@mellanox.com" , "Nicolau, Radu" , "Kantecki, Tomasz" , "Van Haaren, Harry" Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v4] eventdev: flag to identify same destined packets enqueue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 Thu, Oct 10, 2019 at 6:13 PM Nipun Gupta wrote: > > > > > -----Original Message----- > > From: Rao, Nikhil > > Sent: Thursday, October 10, 2019 3:36 PM > > To: Nipun Gupta ; dev@dpdk.org > > Cc: jerinj@marvell.com; aconole@redhat.com; pbhagavatula@marvell.com; > > skori@marvell.com; Hemant Agrawal ; > > Richardson, Bruce ; Kovacevic, Marko > > ; orika@mellanox.com; Nicolau, Radu > > ; Kantecki, Tomasz ; > > Van Haaren, Harry > > Subject: RE: [PATCH v4] eventdev: flag to identify same destined packets > > enqueue > > > > Hi Nipun, > > > > > > > -----Original Message----- > > > From: Nipun Gupta [mailto:nipun.gupta@nxp.com] > > > Sent: Wednesday, October 9, 2019 1:03 PM > > > To: dev@dpdk.org > > > Cc: jerinj@marvell.com; aconole@redhat.com; pbhagavatula@marvell.com; > > > skori@marvell.com; hemant.agrawal@nxp.com; Richardson, Bruce > > > ; Kovacevic, Marko > > > ; orika@mellanox.com; Nicolau, Radu > > > ; Kantecki, Tomasz > > ; > > > Van Haaren, Harry ; Rao, Nikhil > > > ; Nipun Gupta > > > Subject: [PATCH v4] eventdev: flag to identify same destined packets > > enqueue > > > > > > This patch introduces a `flag` in the Eth TX adapter enqueue API. > > > Some drivers may support burst functionality only with the packets having > > > same destination device and queue. > > > > > > The flag `RTE_EVENT_ETH_TX_ADAPTER_ENQUEUE_SAME_DEST` can be > > used > > > to indicate this so the underlying driver, for drivers to utilize burst > > functionality > > > appropriately. > > > > > > Signed-off-by: Nipun Gupta > > > Acked-by: Jerin Jacob > > > --- > > > > > > Changes in v4: > > > - Update rel note specifying the API change > > > - Remove redundant rte_event_tx_adapter_enqueue_same_dest API > > > > > > > > > > /** > > > * Enqueue a burst of events objects or an event object supplied in > > *rte_event* > > > * structure on an event device designated by its *dev_id* through the > > event > > > @@ -324,6 +329,10 @@ > > rte_event_eth_tx_adapter_event_port_get(uint8_t > > > id, uint8_t *event_port_id); > > > * The number of event objects to enqueue, typically number of > > > * rte_event_port_attr_get(...RTE_EVENT_PORT_ATTR_ENQ_DEPTH...) > > > * available for this port. > > > + * @param flags > > > + * RTE_EVENT_ETH_TX_ADAPTER_ENQUEUE_ flags. > > > + * #RTE_EVENT_ETH_TX_ADAPTER_ENQUEUE_SAME_DEST signifies that > > all > > > the > > > + packets > > > + * which are enqueued are destined for the same Ethernet port & Tx > > queue. > > > * > > > * @return > > > * The number of event objects actually enqueued on the event device. > > The > > > @@ -343,7 +352,8 @@ static inline uint16_t > > > rte_event_eth_tx_adapter_enqueue(uint8_t dev_id, > > > uint8_t port_id, > > > struct rte_event ev[], > > > - uint16_t nb_events) > > > + uint16_t nb_events, > > > + const uint8_t flags) > > > { > > > const struct rte_eventdev *dev = &rte_eventdevs[dev_id]; > > > > > > @@ -359,7 +369,12 @@ rte_event_eth_tx_adapter_enqueue(uint8_t > > dev_id, > > > return 0; > > > } > > > #endif > > > - return dev->txa_enqueue(dev->data->ports[port_id], ev, > > nb_events); > > > + if (flags) > > > + return dev->txa_enqueue_same_dest(dev->data- > > > >ports[port_id], > > > + ev, nb_events); > > > + else > > > + return dev->txa_enqueue(dev->data->ports[port_id], ev, > > > + nb_events); > > > } > > > > For the if (flags) condition to work for the PMDs that support > > RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT but do not have a > > txa_enqueue_same_dest callback, doesn't the dev- > > >txa_enqueue_same_dest pointer need to be set to the same value as dev- > > >txa_enqueue ? > > Something like below would work, but it would be unnecessary additional cost > if (flags && dev->txa_enqueue_same_dest) Yes > Instead the drivers can have both the function pointers pointing to the same > function in such cases. Seems legitimate? > Ill add the function pointers in the octeontx and octeontx2 drivers in the next spin. OK. Please make the change as slow path. > > Thanks, > Nipun > > > > > Thanks, > > Nikhil >