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 CDB2945EC0; Mon, 16 Dec 2024 15:49:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5814E4025F; Mon, 16 Dec 2024 15:49:19 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 4F00140144 for ; Mon, 16 Dec 2024 15:49:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734360556; 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=ExOIjj8LAyGllwEZAsDZwvz3SdrH8Vn0Bqs7IzGXZ0A=; b=DG8q8xucKZhf8FpxVU0ZLNPCXX1JzM4qFut1l4NNAv12WkMGWg905pU62yyXjsy4mgYRIs 6+JK+H9SIs3PdJQNd3pjzcUR7AAgtPcX/yIAXT3g1UquOg6WjP5rcm9818x8/IDD8u0UES e09PZiqF5NKXiySKDHe/N2avpcwtq+4= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-502-s2JfuvayPKCX5eNrih9OJg-1; Mon, 16 Dec 2024 09:49:15 -0500 X-MC-Unique: s2JfuvayPKCX5eNrih9OJg-1 X-Mimecast-MFC-AGG-ID: s2JfuvayPKCX5eNrih9OJg Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-3021bd72334so21915751fa.0 for ; Mon, 16 Dec 2024 06:49:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734360554; x=1734965354; 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=ExOIjj8LAyGllwEZAsDZwvz3SdrH8Vn0Bqs7IzGXZ0A=; b=Upaid/cSyiJbRWL4l1WJz38IPl9bKEVuBLizjetsXtE0bcvLSAjcFKXr6jM8i8wnCD QDBr2SkEHuQ2aHuCnoAW5J8RhCtbBDRbkDiWWQH4WJW9ae6trGyYDA1lmqL8A2QRbBal 9yRDLT0GyaecOP1l58BgIaYBmJ9j5Bq2+CJM6Jdei692UgF0SQIfNsvdY9GPknyydQyo +YhgO9BVY6vgzBXUGwXxIawbEEthl2IquzUlkMz48JVprZKk4moWcgdvzitBlo7Ekvfo djvM3kWiq7Sp0dePJCxH+SjtSgGeo0oBM6zjOnMobLk8qtnS4AZLTBiSQ/Dn3m0XO+1X MK7g== X-Gm-Message-State: AOJu0YxTPLYVeWJDxw06qMeB6PA0dJERgJoNCehSAYezNcxi3wTyMErc RLqsYcfCwF2qooZ08ToaOOBeFGB6s9Py9ZwNEFd94v3VI9I6JeMNPM/SzmQr7tENvoldA2UmFnG 9QkEXU61DG0QOnr9MZ7h8Ikl/Im1bIqdnQ7WoB/rM2sa6kt+f8ytJTUETJJrAa/BDlRjsQ+NNa9 YoB83VXpa2BKbLtlw= X-Gm-Gg: ASbGncsM2Ky5CwX7M5dxtV5ioOuFeEyVNr4K3EOsnjHgFMcF7rX+2JA/h9yK23IsqU7 SdvhojXgdCvkVdqrVPyQ9bJzgjRiwIfiWTgTI4ngK X-Received: by 2002:a2e:a983:0:b0:300:1d45:871f with SMTP id 38308e7fff4ca-302545669d2mr37990181fa.5.1734360553672; Mon, 16 Dec 2024 06:49:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IGlqYypjyTwjxEuMVoYSUgdm5xlR0efxrPqARjfELSMYsAWf3/oi6Xvq7hplZeCtVBAx6UKoM40Zdf2xtrQPn8= X-Received: by 2002:a2e:a983:0:b0:300:1d45:871f with SMTP id 38308e7fff4ca-302545669d2mr37989921fa.5.1734360553315; Mon, 16 Dec 2024 06:49:13 -0800 (PST) MIME-Version: 1.0 References: <20241213022158.2644-1-chcchc88@163.com> <20241216014353.2036-1-chcchc88@163.com> In-Reply-To: <20241216014353.2036-1-chcchc88@163.com> From: David Marchand Date: Mon, 16 Dec 2024 15:49:02 +0100 Message-ID: Subject: Re: [PATCH v6] graph: mcore: optimize graph search To: Dodji Seketeli Cc: dev@dpdk.org, jerinj@marvell.com, kirankumark@marvell.com, ndabilpuram@marvell.com, yanzhirun_163@163.com, Huichao Cai X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 9WmRqL6639Bwl2qZ7YHOKW4ja7tiqXAzpZM4n7Am6X4_1734360554 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 Salut Dodji, On Mon, Dec 16, 2024 at 2:44=E2=80=AFAM Huichao Cai wrot= e: > diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore > index 21b8cd6113..a92ee29512 100644 > --- a/devtools/libabigail.abignore > +++ b/devtools/libabigail.abignore > @@ -33,3 +33,8 @@ > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > ; Temporary exceptions till next major ABI version ; > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > +[suppress_type] > + name =3D rte_node > + has_size_change =3D no > + has_data_member_inserted_between =3D > +{offset_of(total_sched_fail), offset_of(xstat_off)} Here is a suppression rule I suggested but does not have the intended effec= t. For the context: Before the change (that you can find below with the next hunk), we made sure to zero the whole rte_node object at runtime in the library allocator. And the offset of the field next to 'dispatch' is fixed with an explicit alignas() statement. /** Fast schedule area for mcore dispatch model. */ union { alignas(RTE_CACHE_LINE_MIN_SIZE) struct { unsigned int lcore_id; /**< Node running lcore. */ uint64_t total_sched_objs; /**< Number of objects scheduled. */ uint64_t total_sched_fail; /**< Number of scheduled failure. */ } dispatch; }; /** Fast path area cache line 1. */ alignas(RTE_CACHE_LINE_MIN_SIZE) rte_graph_off_t xstat_off; /**< Offset to xstat counters. */ If you want the whole definition, you can have a look at: https://git.dpdk.org/dpdk/tree/lib/graph/rte_graph_worker_common.h#n87 [...] > diff --git a/lib/graph/rte_graph_worker_common.h b/lib/graph/rte_graph_wo= rker_common.h > index d3ec88519d..aef0f65673 100644 > --- a/lib/graph/rte_graph_worker_common.h > +++ b/lib/graph/rte_graph_worker_common.h > @@ -110,6 +110,7 @@ struct __rte_cache_aligned rte_node { > unsigned int lcore_id; /**< Node running lcore. = */ > uint64_t total_sched_objs; /**< Number of objects= scheduled. */ > uint64_t total_sched_fail; /**< Number of schedul= ed failure. */ > + struct rte_graph *graph; /**< Graph correspondin= g to lcore_id. */ > } dispatch; > }; Now, the patch adds a new field in the struct {} dispatch field. Here is what abidiff reports: $ abidiff --version abidiff: 2.6.0 $ abidiff --suppr /home/dmarchan/git/pub/dpdk.org/main/devtools/libabigail.abignore --no-added-syms --headers-dir1 /home/dmarchan/abi/v24.11/build-gcc-shared/usr/local/include --headers-dir2 /home/dmarchan/builds/main/build-gcc-shared/install/usr/loca= l/include /home/dmarchan/abi/v24.11/build-gcc-shared/usr/local/lib64/librte_graph.so.= 25.0 /home/dmarchan/builds/main/build-gcc-shared/install/usr/local/lib64/librte_= graph.so.25.1 Functions changes summary: 0 Removed, 1 Changed (9 filtered out), 0 Added functions Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 1 function with some indirect sub-type change: [C] 'function bool __rte_graph_mcore_dispatch_sched_node_enqueue(rte_node*, rte_graph_rq_head*)' at rte_graph_model_mcore_dispatch.c:117:1 has some indirect sub-type changes: parameter 1 of type 'rte_node*' has sub-type changes: in pointed to type 'struct rte_node' at rte_graph_worker_common.h:92:= 1: type size hasn't changed 1 data member changes (2 filtered): anonymous data member at offset 1536 (in bits) changed from: union {struct {unsigned int lcore_id; uint64_t total_sched_objs; uint64_t total_sched_fail;} dispatch;} to: union {struct {unsigned int lcore_id; uint64_t total_sched_objs; uint64_t total_sched_fail; rte_graph* graph;} dispatch;} What would be the best way to suppress this warning? I tried the following which seems to work, but I prefer to ask for your adv= ice. [suppress_type] name =3D rte_node has_data_member_at =3D offset_of(total_sched_fail) Thanks. --=20 David Marchand