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 1C1E8A0A0C; Wed, 28 Jul 2021 16:27:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D59F1410F0; Wed, 28 Jul 2021 16:27:08 +0200 (CEST) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by mails.dpdk.org (Postfix) with ESMTP id 5796E410ED for ; Wed, 28 Jul 2021 16:27:08 +0200 (CEST) Received: by mail-wr1-f46.google.com with SMTP id r2so2837220wrl.1 for ; Wed, 28 Jul 2021 07:27:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=QuIgMPccGaCo+XjHAPg2z5FtZspnCIPxVnaXT1+zHe0=; b=OAFqNPIFrKQWkR9ZS7cGJUWFAxhsSwlEv0bG4SMqoD2PYD9SWFMSV1OaAUoXEJbtLe DLojG+X2ki8CHyODcSlZq/YchFohnm6RB2U4zeBcJAPEnZKs6Fk2Syv55rcZsr1Duttv ZKO6rkq2k2Vc+NKmeIJZaR+Ak7SZN87AY287jn0ZuQxDvaN6kpvKsxYxGYKgjrRPxHVL OOgGKONsKXzAxVjfJk7mZUplrUarKDBmxEB1E7Bf2fyX9VKJ+LmUoakJP4YJ0hrmJgee 95f7YfVKLhgusxiiJj2qcAu6aRRlaSlFMxeyeVeGbOp8jZ7Gfjqrwv7BMN1TRiK1jA92 o85g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=QuIgMPccGaCo+XjHAPg2z5FtZspnCIPxVnaXT1+zHe0=; b=md+ITP5AVJ7eZz7uYsI+34ZJ7oroYcA4CwaSVrJpH0TGKuNI3/6PCS/JA2q8YEzg7k oRmT9zjEN81M0D1EQtJ5m9sVwAklgLHRhwATRM1sCMqP4I6dPiLfs++bF1p4kWyTp2AB MRe5V1ekABqjPxnxJyKngX7fLSG7w1RhcZc7W98FghkEkRIaAXXZ5PU6KZeGTNRZJveW iH8CXHyNqQCBXnQ7etHKVZir5XwDPVrX80WqDXllgGmSmDJfesOZFC5LO05PwHMgz0C8 tR49pbBeyNwbHOppcoDdzp5sHEtqtMIyXk7GWGxuED4Joa1eFZ0857uCFbB51cCT3zFz UhHg== X-Gm-Message-State: AOAM5314IvTAw5/Zk8jivx6SFUdJMe/iBSaWmpkXnkPhOW351cle/dP1 V1pSpkPOlJlxxTnmq8hib+pp5w== X-Google-Smtp-Source: ABdhPJwj7eJCbzqPhTMfm+fvH5X37U1v2Vj0Rng8lNA4OMUVKhOUlY9n6/5dhlhCWjN/vg/jMwUWsw== X-Received: by 2002:a5d:6691:: with SMTP id l17mr21119453wru.368.1627482428123; Wed, 28 Jul 2021 07:27:08 -0700 (PDT) Received: from 6wind.com ([2a01:e0a:5ac:6460:c065:401d:87eb:9b25]) by smtp.gmail.com with ESMTPSA id i5sm7272735wrs.85.2021.07.28.07.27.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 07:27:07 -0700 (PDT) Date: Wed, 28 Jul 2021 16:27:06 +0200 From: Olivier Matz To: =?utf-8?Q?Micha=C5=82?= Krawczyk Cc: Ghalem Boudour , Marcin Wojtas , Guy Tzalik , Evgeny Schemeilin , Igor Chauskin , dev Message-ID: References: <20210712170153.11508-1-ghalem.boudour@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [dpdk-dev] [PATCH] net/ena: enable multi segment in Tx offload flags 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" Hi Michał, On Wed, Jul 14, 2021 at 12:02:32PM +0200, Michał Krawczyk wrote: > pon., 12 lip 2021 o 19:03 Ghalem Boudour napisał(a): > > > > The DPDK ENA driver does not provide multi-segment tx offload capability. > > Let's add DEV_TX_OFFLOAD_MULTI_SEGS to ports offload capability by default. > > > > Hi Ghalem, > > This patch enables announcement of the DEV_TX_OFFLOAD_MULTI_SEGS > capability, but still the application may not request this offload. > > As ENA PMD currently assumes all the mbufs may have multiple segments > (and we don't have fast-path for the other cases), I suggest > overwriting this flag in the ena_dev_configure(), similar to what > we're doing with the DEV_RX_OFFLOAD_RSS_HASH flag. To give some more context, our application currently checks if the driver supports multi-segments by checking its capabilities, and asks for the feature if it is advertised. When dealing with drivers that do not advertise this capability, our app linearizes the segmented mbufs before sending them to the driver. I think this is the proper way to use the API: if the driver supports to handle multisegmented mbufs, it should advertise the capability. Regards, Olivier > Best regards, > Michal > > > This flag in not listed in doc/guides/nics/features/default.ini, so > > ena.ini does not need to be updated. > > > > Signed-off-by: Ghalem Boudour > > Reviewed-by: Olivier Matz > > --- > > drivers/net/ena/ena_ethdev.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c > > index dfe68279fa7b..a8422ee425ce 100644 > > --- a/drivers/net/ena/ena_ethdev.c > > +++ b/drivers/net/ena/ena_ethdev.c > > @@ -2055,6 +2055,7 @@ static int ena_infos_get(struct rte_eth_dev *dev, > > DEV_RX_OFFLOAD_TCP_CKSUM; > > > > rx_feat |= DEV_RX_OFFLOAD_JUMBO_FRAME; > > + tx_feat |= DEV_TX_OFFLOAD_MULTI_SEGS; > > > > /* Inform framework about available features */ > > dev_info->rx_offload_capa = rx_feat; > > -- > > 2.28.0 > >