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 D86EB42C01; Thu, 1 Jun 2023 11:43:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ADF19406B3; Thu, 1 Jun 2023 11:43:21 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id AF71C406A2 for ; Thu, 1 Jun 2023 11:43:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685612600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aDHfxo5f0zBT+4zRppZ05OoQ9XAQvp1Go1E8YQtKKHc=; b=URtKhu+fDwIbl8sKtgLLQKOmP7/TWT5JsI7XoG3LPdqmu/yKLMlSxB0Q9AiFAEcDytHL+Y VV6rLs9vEW2GEx2g/mJaebKqTyqiX6zcOAF8Fsd44RoYrWckezr5IG5NZfo+YVzGPCOx26 vJTa1gengDKSczPiZEqEZVe2nKxlF/s= Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-441-jaC5dFRnP2OQPfz_ourNXA-1; Thu, 01 Jun 2023 05:43:19 -0400 X-MC-Unique: jaC5dFRnP2OQPfz_ourNXA-1 Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-1b03057588cso6904025ad.1 for ; Thu, 01 Jun 2023 02:43:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685612598; x=1688204598; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aDHfxo5f0zBT+4zRppZ05OoQ9XAQvp1Go1E8YQtKKHc=; b=K0DTKhqF1hOxeXAUcGKBI5qtOILQpo/sm7eCz6k8B7iwyn+OJ6zitRA9QPDZW0q6bY NsxKZmHsIMuYGtmttx7TP9aFZxzuUPKi70cAe0VAJzAB29sTk8a7jMGy5c3TiNcwN5zj ed9K7Kc/h1xomvCLUV8xPeOUhZ4vAGRx7wcUIu/IcYbxm3g+CTlZmA4GxRoASd9AGGAh 67szif/a6xZmMdk/D+aCnzBGI2C62q0QezmXpbSN7bQxeGJVoNuFsjsaX5+6JVxTQMge vwhgnH2sZgEjgeFeQS8qhMJL+D1xe3lkWm0FFn+kyA+TXXyFVe9+rbta+WGpDdQs28SS pxuw== X-Gm-Message-State: AC+VfDyeFRVgBPv5o3lP0NupZcm8pk9OUJvlmGxva+so1KEerce5eiNN z2q/oKJEwMRRF7zhWC0lP6mq45hCQgDi17UqYlQU0PvBVADm1L6czSFM5PWuhhwp9q+eqOGBR5x Fhn1FK3DWqt03CU8jthxZ8usSxbSidg== X-Received: by 2002:a17:902:d2c5:b0:1af:e295:ad56 with SMTP id n5-20020a170902d2c500b001afe295ad56mr9719393plc.49.1685612598030; Thu, 01 Jun 2023 02:43:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ONB8qKN2ldRqg5ZcQqmVBMIBUAEHk6b3RsLA5wBbVzBLpbbj1UBOATcwWlA3EbhWviFMN/5WxFlaC2+wxEjQ= X-Received: by 2002:a17:902:d2c5:b0:1af:e295:ad56 with SMTP id n5-20020a170902d2c500b001afe295ad56mr9719376plc.49.1685612597715; Thu, 01 Jun 2023 02:43:17 -0700 (PDT) MIME-Version: 1.0 References: <20230505103102.2912297-1-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Thu, 1 Jun 2023 11:43:06 +0200 Message-ID: Subject: Re: [RFC PATCH] ethdev: advertise flow restore in mbuf To: Ori Kam Cc: "dev@dpdk.org" , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , "i.maximets@ovn.org" , Aman Singh , Yuying Zhang , Matan Azrad , Slava Ovsiienko , Andrew Rybchenko , Ferruh Yigit X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Thu, Jun 1, 2023 at 11:31=E2=80=AFAM Ori Kam wrote: > > > > > -----Original Message----- > > From: David Marchand > > Sent: Thursday, June 1, 2023 11:48 AM > > > > On Wed, May 24, 2023 at 8:44=E2=80=AFPM David Marchand > > wrote: > > > On Wed, May 24, 2023 at 6:00=E2=80=AFPM Ori Kam wr= ote: > > > > > As reported by Ilya [1], unconditionally calling > > > > > rte_flow_get_restore_info() impacts an application performance fo= r > > drivers > > > > > that do not provide this ops. > > > > > It could also impact processing of packets that require no call t= o > > > > > rte_flow_get_restore_info() at all. > > > > > > > > > > Advertise in mbuf (via a dynamic flag) whether the driver has mor= e > > > > > metadata to provide via rte_flow_get_restore_info(). > > > > > The application can then call it only when required. > > > > > > > > > > Link: http://inbox.dpdk.org/dev/5248c2ca-f2a6-3fb0-38b8- > > > > > 7f659bfa40de@ovn.org/ > > > > > Signed-off-by: David Marchand > > > > > --- > > > > > Note: I did not test this RFC patch yet but I hope we can resume = and > > > > > maybe conclude on the discussion for the tunnel offloading API. > > > > > > > > > > > > > I think your approach has a good base but what happens if > > > > it is not relevant for all flows? In this case your solution will n= ot work. > > > > > > Sorry, I am not following. > > > Could you develop? > > > > I still don't get your comment, could you give an example/usecase > > where this approach can't work? > > Thanks. > > > I'm think of a use case that some flows have the restore info, while > other don't for example, we get arp packets or some packets that > are not tunneled, and we also get tunneled packets. > > Or for example PMD supports this flag but the application didn't offload = such a rule yet. Again, maybe I missed something, but my proposal is for a *per packet* report from the driver. I am not for a global driver capability, if this is what you have in mind. > > In those cases application will be slow even if he didn't offload the rul= es, > I assume we can say that if application wants to use this he should know > that other packets will have some performance issues. > > From my point of view if application requested the tunnel offload it shou= ld > always check this function. With a per packet flag, the application only calls restore_info when such tunnel offload rules have been requested, and only for packets that require it. --=20 David Marchand