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 86C22A0540 for ; Tue, 13 Dec 2022 13:51:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 589D040146; Tue, 13 Dec 2022 13:51:32 +0100 (CET) Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by mails.dpdk.org (Postfix) with ESMTP id B0D6D400D5 for ; Tue, 13 Dec 2022 13:51:30 +0100 (CET) Received: by mail-ed1-f45.google.com with SMTP id a16so17533612edb.9 for ; Tue, 13 Dec 2022 04:51:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=pi9vAVRcYGeL7rlkVPFSFEIYUFdqHTLjvQzV08G91EY=; b=IsKXU67jR0VBXNGV9jEjLheUVfYx9ZFsrYd/HwjMl38EAcGKTNVmytbRLubKjArkDn x4/w2Dj8csmneZLm35UHQQtiTlW4bpGt1ymGMewjxeOiesdjT3Im7VazQftqSJW6eghv /tdIi8M0J5/vgkuqpXdpO5lVzC+0QqJiFLVZWAit2qZDE+IX3F28Juy7BmiEWpeNC5A/ a6IK6g/vLqgE6w76eGvwGl/XFCCIKn2nm9BUDunBMTPCs7CzATJ3QDc2ZTcAlvb+UP4H Gyk6BTdfMvj87oySvwVakcCc8hElRkpQr7Zw/3FpOYdXnACHj6GbpVhHQE89vN9IDtJJ yxow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=pi9vAVRcYGeL7rlkVPFSFEIYUFdqHTLjvQzV08G91EY=; b=3bBMaJDTITz/Z7t5r5rG5PEQV8DmMItwsG0xgH6FiHIddJwCCXMZpKs5DFPmzNkopq GuExipMzknXptg0kKuOj2hSA7KvPLQKRkEuNjw+10XqEyhNYySTqPxk/iueHAZ4Iyjme SKKgnv/ayQiXmdWo7YCHWKpINwjTi8VtTQHBEy3uoMFCEX3/7DLa4M3hOaiBVCzYKXjG 5JVHsdmYex8clyCvm3aCt238WJbstznPDp9nnkmZ6B+iTCUX7ozeBFcXg0RZ3+s5jcyO vWiQ/bLfCf0c2jXcJxNhMykgWfXTHlsy9v1OVIDhPwjrEMmJv7dinDUL7HZNF/hFG5u9 clGg== X-Gm-Message-State: ANoB5pkYjjB97hbG3KaB8SS/uMefMcgRUfr5/7+A2UfisIpaiZcnU7jA +vUPL+AcZpRd/orEpKlcoOrdcQ5/jByffCjaBu9ul04Gh/VS8Q== X-Google-Smtp-Source: AA0mqf7aXFRUnsnGfz2s3JBmmzRT1aJUlp/2eC4iZtHF2aDDyTMFdcg0nL9IwuUn6+UJJ+0jW5kViNMQhfxFarAlr4U= X-Received: by 2002:a05:6402:1755:b0:470:2d48:bda3 with SMTP id v21-20020a056402175500b004702d48bda3mr247036edx.136.1670935890229; Tue, 13 Dec 2022 04:51:30 -0800 (PST) MIME-Version: 1.0 From: Antonio Di Bacco Date: Tue, 13 Dec 2022 13:51:19 +0100 Message-ID: Subject: Anonymous structs in DPDK To: users@dpdk.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org I noticed that DPDK include files have a number of anonymous/unnamed struct: For example: /** * The rte_spinlock_t type. */ typedef struct { volatile int locked; /**< lock status 0 = unlocked, 1 = locked */ } rte_spinlock_t; This choice doesn't allow to use forward declaration. I need forward declaration because I'm using a rte_spinlock_t pointer in a C++ class and I don't want to include rte_spinlock.h to prevent my application to include it as well. Is there any reason to use unnamed structures? Thx