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 DCD8943E67; Sun, 14 Apr 2024 12:35:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 766D440279; Sun, 14 Apr 2024 12:35:55 +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 E859C40270 for ; Sun, 14 Apr 2024 12:35:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713090953; 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=pP93Pn+sktA29DQb+5icApLsWQH+KUG4tuRmKPZLqa4=; b=LW/S2sE7va2F5hkQ7vDC4XEhhdtpHo2HsTWNE+t8zMsjQIiahKqC4GUOXYSYxglNjhDcDT WCo9LsomqdOcTpLzVyiEm1QsFlGge9BGkCq5dKeFAzdDABen1AASPxpqfSBuCMtbnSxOfi HuBm469aNMgTdz+Bn/kzPzMFABHVSFs= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-655-w_APRjD5N3GhBBMYBXsPBQ-1; Sun, 14 Apr 2024 06:35:51 -0400 X-MC-Unique: w_APRjD5N3GhBBMYBXsPBQ-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-343f8b51910so1409503f8f.3 for ; Sun, 14 Apr 2024 03:35:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713090950; x=1713695750; h=in-reply-to:references:user-agent:subject:to:from:cc:message-id :date:content-transfer-encoding:mime-version:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=pP93Pn+sktA29DQb+5icApLsWQH+KUG4tuRmKPZLqa4=; b=pze2XmgUMv46iGaWsYokF2FZatgB8NGLXE/ffOhgn+JXIixzPrc5NCHHdGydmQ3n+0 m7RMXEhRY3aSqOx056K5DePCmbCwScNWDFY6k/5Dii316Qql7he3JCVJpU/y8dH6fVcw HVZNDspgPfsaC2pKGZxa1Pyfrd1QzORa/1y0UMS43rN97ee7VOjNrdsTtwWJuwt7A9FV uxbjPIH7s4sWr0bw0eyLbUCb2N3I2r+/yEAnw+qG8UZVLwE1HYy205Jap8Zi/DPMFgra CaDLAz4DsXtpqgzWCa3Gfd+RXu4AA4g+ryULmvECRXbvmNIjuK7YuCVtpKm3etS6/ksC wxwg== X-Gm-Message-State: AOJu0YzjfqBn/tm5cvv3jobixNMSAU2tmrpb2CdyhaWUqdS0JP4d22YP EY0bEyBbIRB+afexc6bzLSgrq8aWGdGnRDXvOkDgQHUe3CXxHRfdlgXxQePPdM9m7rGxi0E1LhS gFOs6ZuFq3XeZ2gc5ozH/eZQ4x+yjVhEgeZHwiJCD X-Received: by 2002:adf:ef84:0:b0:343:f2f1:21c1 with SMTP id d4-20020adfef84000000b00343f2f121c1mr4421307wro.24.1713090950488; Sun, 14 Apr 2024 03:35:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG5/OfH1Fjko+NuLMGhy5uPfjOWrhX8maa2c+V+MZ1AFK10uL+VTg1mAZpQq2afoqPT1l7ILw== X-Received: by 2002:adf:ef84:0:b0:343:f2f1:21c1 with SMTP id d4-20020adfef84000000b00343f2f121c1mr4421299wro.24.1713090950091; Sun, 14 Apr 2024 03:35:50 -0700 (PDT) Received: from localhost (2a01cb000f8b9700ffd8872f0c4ad9d4.ipv6.abo.wanadoo.fr. [2a01:cb00:f8b:9700:ffd8:872f:c4a:d9d4]) by smtp.gmail.com with ESMTPSA id i10-20020adffc0a000000b003456c693fa4sm8763634wrr.93.2024.04.14.03.35.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 Apr 2024 03:35:49 -0700 (PDT) Mime-Version: 1.0 Date: Sun, 14 Apr 2024 12:35:49 +0200 Message-Id: Cc: , "Jerin Jacob" , "Kiran Kumar K" , "Nithin Dabilpuram" , "Pavan Nikhilesh" , "Hongbo Zheng" , "Zhirun Yan" , "Thomas Monjalon" From: "Robin Jarry" To: "Jerin Jacob" Subject: Re: [RFC] graph/node: feedback and future improvements User-Agent: aerc/0.17.0-127-gd6c3edd0e9f8 References: In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=Flowed 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 Hi Jerin, Sorry for the delayed reply. Thanks a lot for your comments! By the way,=20 I completely forgot to say that the rte_graph design you created is=20 awesome. It makes it a breeze to write a clean data path implementation.=20 Kudos! Please see my remarks inline. Jerin Jacob, Apr 06, 2024 at 01:11: > Great. > > You may consider improving and/or adding inbuilt nodes for generic=20 > protocol processing. Furthermore, consider contributing on app/graph.=20 > I think, most likely, you should be able to leverage app/graph. Thanks! I am definitely planning to upstream nodes into DPDK as much as=20 possible. I still need to determine what is the correct level of data=20 path node public API so that the nodes can be agnostic of the control=20 plane implementation. > > only one of each ethdev_rx and ethdev_tx nodes per graph? For=20 > > simplicity and to make dynamic rxq changes possible, I chose to have=20 > > a single rx & tx node per graph. Do you think we could change the=20 > > in-built nodes to support both modes ? > > In terms of performance, the current scheme will be more performant. > > I would suggest, we can add another inbuilt node for this. This is to=20 > avoid additional checks in fast path to enable dynamic behavior.=20 > Probably need to use rcu as control thread updates port/queue=20 > configuration changes and fast path needs to adapt to it. Ack, I'll think about adding a variant of the ethdev_rx/tx nodes. > > There is no way to prepare node data context when calling=20 > > rte_graph_create(). The current implementation uses global variables=20 > > [4] but this makes it very "static". > > Since the those are node and it is private. I think it is OK. > > Also using, rte_graph_node_get_*() one can get the node and its ctx at=20 > anytime. I had not thought about accessing the nodes private data outside of fast=20 path. This would simplify nodes data update by a huge margin. > I think, rte_graph_create() will be complicated, e.s.p it supports=20 > loading nodes with regex pattern. I think, we can weigh in pros and=20 > cons if you have patch. I agree that it would make that function very complex. Probably this is=20 not required as you said before. > > Pluggable nodes > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > > Currently, the declaration of next nodes is static. In order to=20 > > support plugins (e.g. via dlopen() or similar), could we introduce=20 > > a way to dynamically insert a node in the graph? > > > > I have done this using a post-init callback system but we could=20 > > think of a different way. > > > > Also, could we allow overriding nodes with RTE_NODE_REGISTER()? So=20 > > users can replace the default implementation with their own if they=20 > > need to. > > I think, if we document the inbuilt node's downstream node ID. After=20 > rte_graph_create(), one can use rte_node_edge_update() to dynamically=20 > add custom/user defined nodes in between. > > I thought of adding more helper functions (leveraging existing=20 > rte_node_edge_update() for this) It will be more like "feature arch"=20 > in VPP. Provided, node cannot add dynamically after=20 > rte_graph_create(), but one changes the downstream node connection=20 > dynamically. After I get something satisfactory, I will send an RFC patch with some=20 helper functions to allow flexibility when registering nodes. > Yes. I think, we can use mbuf data offset or new dynamic mbuf filed=20 > for this. Ack, I'll send a patch. Cheers.