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 7124943D47; Mon, 25 Mar 2024 16:47:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0928040695; Mon, 25 Mar 2024 16:47:57 +0100 (CET) Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) by mails.dpdk.org (Postfix) with ESMTP id 397D840298 for ; Mon, 25 Mar 2024 16:47:55 +0100 (CET) Received: by mail-oi1-f176.google.com with SMTP id 5614622812f47-3c3a4101721so2797151b6e.1 for ; Mon, 25 Mar 2024 08:47:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711381674; x=1711986474; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=pLQCNIjq0EN2q7y7IUwCZi9kwWCx0AmZkuGD3CiQf4E=; b=QaBacmR0TJJPUxdU7Fa+Gfwm9UAV9TB4dX1yY/K7aOh0lPA+JImna0UY9b4qDAIsk7 eRNbL1/cFW9SpnnRcpw8eNUgsEU/dKFv9o6XYP5t1ssAYkJ8VTC71QE8Cq3o/DTnz2oS R5jrgvcB7Toss5VNisAZ/qtNfboxciH/4tDsO8fW6TSSg2JNxl8VFp0x83rxqYrINDbw el8fXaxwSaH22LWdOTpr+GOUphDUebXQHTgeUs3MkskDc/lsml2vGzBh6OrVE+Lz+kKh WpRY22PSJ7f+LG380ovEDUWC3TtgPsVrQ2mdvtHujDs4MQbWv5hDuPcv74F6LtWxBU69 QIBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711381674; x=1711986474; 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=pLQCNIjq0EN2q7y7IUwCZi9kwWCx0AmZkuGD3CiQf4E=; b=lYQkhCn0s4VtA2zFggbHZsizYxTPIhS205rYPP312kN+tSsquWjT2Fn07Gwpb8dWIZ lUj6VKxjw3MHar9BcxigffCWY7bS1aF/89EMR91s0hMyT4KGnB0ccsvO1hrPIRU+MmiD YmpHTbtkQVanPPw3Kkx258iIKM8g9RBryYaRrm7tFatE2UASccM8ymLmbSk+DgVJK1qH 4bzwyjczSAdcVJQDen45Qz/i5jJmCJz3hceG2/rlRkqrjAPr5K2lSYgwCTCMhxZTAMu6 pafwVYIRRs/YHr79HcoPxet4BlSSxI4GGZ4H5ys6pLkSJwWLYwuPkiuqMCXyY5//Wm6y vhVA== X-Gm-Message-State: AOJu0YzEhkaX8g08kJ8NiRdc7yeUJCL7szJu6BZy66gAuBj+3SDfxgyl Hg6EPY/tru5iwv0ijFhnv89DMt7/hXOuLPPrmWNg5fcpLlyqZLYuBQXSQMGHlZPC06r1AdExgms ESPNGrt+c3uraV9JVP//Puuzo890GHmq3iUs= X-Google-Smtp-Source: AGHT+IG3gj5FxLGBCAB5l71tLZxvXFOl4zb550si2oMGdzDOe1lAuRlTARY2jScqfqQNKj7PYQ6OP1FMr1c5MWEoii8= X-Received: by 2002:a05:6808:179f:b0:3c3:c02d:d4da with SMTP id bg31-20020a056808179f00b003c3c02dd4damr10452758oib.39.1711381674147; Mon, 25 Mar 2024 08:47:54 -0700 (PDT) MIME-Version: 1.0 References: <20240325100500.694748-2-rjarry@redhat.com> In-Reply-To: From: Jerin Jacob Date: Mon, 25 Mar 2024 21:17:28 +0530 Message-ID: Subject: Re: [PATCH v3] graph: expose node context as pointers To: Robin Jarry Cc: dev@dpdk.org, Jerin Jacob , Kiran Kumar K , Nithin Dabilpuram , Zhirun Yan , Tyler Retzlaff 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 Mon, Mar 25, 2024 at 8:50=E2=80=AFPM Robin Jarry wro= te: > > Jerin Jacob, Mar 25, 2024 at 12:35: > > Another option could be to have a helper inline function/macro to take > > care of casting to make app code clean of casting. > > Would something like this be suitable? > > #define RTE_NODE_CTX_PTR1(n) ((void **)(n)->ctx)[0] > #define RTE_NODE_CTX_PTR2(n) ((void **)(n)->ctx)[1] Works for me. No strong opinion about the name, RTE_NODE_CTX_AS_PTR1 may be more reflecting the intent. >