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 98D3B45702; Wed, 31 Jul 2024 17:05:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 72D7240E2D; Wed, 31 Jul 2024 17:05:17 +0200 (CEST) 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 C43494065A for ; Wed, 31 Jul 2024 17:04:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722438276; 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; bh=kpD4JiUxcTpMfxAco3XAQL5tJbY9JqaJwEjAKxrcn9M=; b=JnSQI/+jBFveVtDkJLHOblE4cinKu9k3FMVVdASjkXFFCodQufgBkyhbPCryYKTSmdfdWS Fz5uTHTqWI6q08JP1cqiGgUNFtQMM7XWWFErBN0CoyxQx2j97MXewPbsOI3VS1C5Is2Vdr /la8lTZ59h5kLnPnTudDxh2xKOu4VWQ= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-596-HXdFYWShNI25mf1_AvTJgg-1; Wed, 31 Jul 2024 11:04:35 -0400 X-MC-Unique: HXdFYWShNI25mf1_AvTJgg-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-42809eb7b99so6053095e9.0 for ; Wed, 31 Jul 2024 08:04:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722438274; x=1723043074; h=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=kpD4JiUxcTpMfxAco3XAQL5tJbY9JqaJwEjAKxrcn9M=; b=gKmThp2+96wuDDcFWgEC/mL5zYl8E5AiXlIsSQJI00qBX6+oIf9xKFoau4Qj+4W4he oRgXZU2Xyd2CQfxn3IGq8dxAO6Tz6I5M2RdqC3WrcgrA+fx3ym5GoB0rNHIbvMYRXGVZ ptAqa8SLyBU+R4K6cMx6K46pbXAbJ0j7axhlVRgjaIZVgx0u6KQiP0i5HDMHXqQPOM3n TsujqNHM85kGiBcr6Bp+58+QJnSCJlsDtZfj6p8C2j+HH2bPOKBCH8h+cQsrAzgc6WG2 hqXg8055wijN2zGqYeI63rEHHsWfjEw8UphlxY6kNfJyEVU7SCLVQC37aXDRostGTywU om/Q== X-Forwarded-Encrypted: i=1; AJvYcCUxbn0LtS/WU2Hq/wAtNisMLNkOPMEMT5fAIvnzIkYhwXZO9cIZQGuJNK3wPtHRAAljYiHJE+qGa9zuDa8= X-Gm-Message-State: AOJu0YyH3jvX3MgwpHSucrM6MAo3x9KjhUpzSc8yRO7JZbmRuy4Lb0Na QDIUIRhL2kCm2Bdo+7EcxWM8aJbxoUX91OLbJDIlBJjkNg4Vm/aapyIoFG4R7dLDfm6TQj7lROm lEMbuDgXjH76TVr+Yss5+Gnw0fT1MOrxgrSjL5KgZ X-Received: by 2002:a05:600c:1f92:b0:427:abfd:4432 with SMTP id 5b1f17b1804b1-4282444061cmr41145735e9.12.1722438273825; Wed, 31 Jul 2024 08:04:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHdNJ07UjoTAg1cG5vtVA9dsKz7xww2PcvQPdDAz9wEQNIjPLuJzx+2JxyKBfbqMnoWW8MKHQ== X-Received: by 2002:a05:600c:1f92:b0:427:abfd:4432 with SMTP id 5b1f17b1804b1-4282444061cmr41145345e9.12.1722438273443; Wed, 31 Jul 2024 08:04:33 -0700 (PDT) Received: from localhost (2a01cb00025433006239e1f47a0b2371.ipv6.abo.wanadoo.fr. [2a01:cb00:254:3300:6239:e1f4:7a0b:2371]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4282bba30bbsm24545155e9.47.2024.07.31.08.04.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 31 Jul 2024 08:04:33 -0700 (PDT) Mime-Version: 1.0 Date: Wed, 31 Jul 2024 17:04:32 +0200 Message-Id: Cc: "Thomas Monjalon" , , "Bruce Richardson" From: "Robin Jarry" To: "Vladimir Medvedkin" Subject: fib/rib: allow storing void * instead of nexthop index User-Agent: aerc/0.18.1-7-g5f815baec6e0 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 Vladimir, I noticed that the fib/rib APIs (both IPv4 and IPv6) require the next=20 hops to be represented as integer indexes. Reading the code, I noticed=20 that they are stored as uint64_t with the MSB used for internal=20 purposes. This require either having a contiguous array of nexthop objects and=20 choose an index in that array, or store pointer offsets as nexthop=20 indexes and do pointer arithmetics to reconstruct the real pointers.=20 Both are not very practical and/or hacky. Would it be possible to store arbitrary pointers? That would mean=20 moving that 64th bit information elsewhere. I'd love to hear what you think on the matter. Cheers, Robin