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 DC8DC42EB7; Wed, 19 Jul 2023 12:03:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C73BC40DFD; Wed, 19 Jul 2023 12:03:45 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2087.outbound.protection.outlook.com [40.107.93.87]) by mails.dpdk.org (Postfix) with ESMTP id C1CDE40A80 for ; Wed, 19 Jul 2023 12:03:44 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W2Rj5uA86a1f1pMn1s9wtLwj03SF6LqLFcOSz5jdo0HDxjSn0Ya+oiWheK2pmBFTEkKPZNkGeqAwnYtc/u7htJWUfrnKE4yVF+YZY6sTYmC3ajmBX7h1/8sQQQRAGzoxUtz/YKu/hHnqhCQoAZ53WSmpFmkdmugQMaNj/ZxTaOx1e9QYN3fHrqiGKwq+9Dru8ePopTlNIAeZU511B23aR9kxObf2NuTHkV+hkUxg18PiuEYhvu/IHVLRj7ul15U0G/muK2hF4782yu9BncBlJ8hCyyBnzs/jiMhJyHLBOqR0T2xigDpkoRAbA1WCg2tuYQFZ8q1sjMIHdEPlPR/TFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UCDLjR6A24JbdvR8h916eqAzYVag9AK8F7eZBlXGX2s=; b=H4xwOqNT4HRiPtKvdBtOQ3Ga4eCXaIVvWA42NR3Emb7eJ6bNdHeVYsfKxB6tMzDxtCy/KL4if88fIiLwx2xmBF34X62G97Cjsas3LLZUdDBr2Ss57FA27+RSxTH1Ov1kFolsshTgHnokCGyrAFXOScH2uiFHUk1K1Uer3fku5wDOplKB0sIqxqdcHxJMTzcy9qVHHcZfmfc9KiVPOFmEqtJS5Mk/5fhk2pvXuSsdgOYvnXNI/oFkbRHg/+dJalFiNfueMhm8yP4gK71X/1aXO9LsH88yIkWsWkwfn4KpI2R9oAJWf172rWeUcP5sxpIv0qAMVu8XDt6GBk1/WGk1fA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UCDLjR6A24JbdvR8h916eqAzYVag9AK8F7eZBlXGX2s=; b=M04+hTwNcgSIQiaBYU5e4sI109zNVf+rEM55fwTiKzUhCKKeVb/wuMMmJYhDj+YamGxYCn6Ab9P3GHDnuv38WeeN3+GPZNBUr0zZ+1HCYXN8F5WOx/Sc8ifgOBn5COjeDz7zT2tQ7ZFo8gu+3WR2RzCzGQRbbhAUumAqEWTy1ww= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by SN7PR12MB7452.namprd12.prod.outlook.com (2603:10b6:806:299::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.24; Wed, 19 Jul 2023 10:03:42 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::15a9:4e83:4217:8b49]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::15a9:4e83:4217:8b49%7]) with mapi id 15.20.6588.031; Wed, 19 Jul 2023 10:03:42 +0000 Message-ID: <75eef8f8-c0c0-1950-6149-756bd624e9d6@amd.com> Date: Wed, 19 Jul 2023 11:03:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] tap: fix build of tap_bpf_program Content-Language: en-US From: Ferruh Yigit To: Stephen Hemminger , Ophir Munk Cc: dev@dpdk.org, Thomas Monjalon , Aaron Conole , dpdklab , David Marchand References: <20230717191548.16429-1-stephen@networkplumber.org> <3d8938a4-acb8-45d0-291b-133ba0157976@amd.com> In-Reply-To: <3d8938a4-acb8-45d0-291b-133ba0157976@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0443.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a9::16) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SN7PR12MB7452:EE_ X-MS-Office365-Filtering-Correlation-Id: 9178248f-bcc4-42f9-0429-08db883f6ed6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pnzZRpXRtIei4Awyc32OOC1OwFtGQw74COckBWAWWbVtBceVP1+2n9p41tv6t4zW8/Pvyx9oe7wQVo9mLKz8jV3HnehTbe2Br2viL72hXfRZIHei3nZ1/BxyTrZkfKpUNVbUYCp7VpqbZb8aZn71nKBRReHAW15NqA0js3FUL59T84+oN7+w9CIlvQj9CqIDYabeOEjE+L6as+R770Hzq6SMpgh6qjDcDcVxfSWKDbxBRDYQnPmL4UMa+HQa1KAm2xV0sWPS2wRLGlay12uADVdBqTRqVlFI7CoActsN9Ejxmc3HFGJgh8D6tNO7AiKi9L8wb2b2G7yc8sWr8dI8AV1XUmsiRRB75NdDwlBisHVqAVwZZO6Z8UDI3ZK3AwNxjWVjd6jXH7TEMs5XI/YIlHFK4r7xAPRBmIPN+YgB4sW8tiK8sLZ3rw7MViSb3Rke8u8aRlJ2t/YHzanxKReIx2+RYC/OXNDZPX8UNEGoNFymRZtNcfHBVF21g4jf6JQO5jj38kUFrE/TnrBwQOHtcTWQ0Mkm8XrtO4oTGNzBjtvhED/KEPwPfJYoAt6ewK92c6h7MEmmqYTJcdk0HHXHrYeGmJYvYoTHAuV173mUSCkwkxVotYkd7yMB7byXU9Cdxc5+TNnP4QrqGA9TFVThzQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(39860400002)(396003)(346002)(366004)(136003)(451199021)(2616005)(110136005)(54906003)(186003)(36756003)(83380400001)(53546011)(26005)(86362001)(6506007)(2906002)(6666004)(6486002)(41300700001)(38100700002)(478600001)(4326008)(66556008)(66476007)(66946007)(316002)(5660300002)(8676002)(8936002)(44832011)(6512007)(31696002)(31686004)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VjZZVUNoRzJzZTlVU2NXaVJ3MVJMNjVMcExTV2lyTXl6d0ZhRDZFWFJBVkg5?= =?utf-8?B?L1ZLb3dkZkVOaHhNL2N3V0FITnN0a1FFQWd1NGJ6anpPR3Vnaklwd0J2ZDJV?= =?utf-8?B?a29sRW5ibU05Ly9PL0lnWFNmV0p6WTFCNFJsTnJVMmJDVnl3ZmpXWEgwSFBW?= =?utf-8?B?Zk5QV3NMMTdzdzVQbUc0YkxyTHN6dHdXVzJWRFhuMFl4UWJEcmF3VDhPNkE3?= =?utf-8?B?WVQ2TENhSVBNMnNsQ25DYTFiYWY0SVh3QXpmSFQ4dE13Ym1pWlhXbmQvWUMv?= =?utf-8?B?MU1yS2tpUzFUT1Y1T3NOMGdEczd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0dEZ0tpa1NCT3NNZ3JC?= =?utf-8?Q?ATpNA4vr2Y8L6pOZu5HlGgHBH?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9178248f-bcc4-42f9-0429-08db883f6ed6 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2023 10:03:42.8116 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XgUXoUBfO0Gopbcb0Aq9Hgy6T7U7hDOFVnHSOJ0PqOi8OHYKvnSus78NelzO1SgC X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7452 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 7/19/2023 11:00 AM, Ferruh Yigit wrote: > On 7/17/2023 8:15 PM, Stephen Hemminger wrote: >> The tap_bpf_program.c is not built as part of normal DPDK >> EAL environment. It is intended to be built standalone >> and does not use rte_common.h. >> >> This reverts the related change from >> commit ef5baf3486e0 ("replace packed attributes") >> >> Note: this patch will cause expected warnings from checkpatch >> because the code involved is not used directly in DPDK environment. >> >> Signed-off-by: Stephen Hemminger >> > > Agree, this seems done by mistake as part of batch update, > > Acked-by: Ferruh Yigit > > > But I can't update the bpf file at all, if I am not missing something I * I can't *compile* the bpf file ... > am not sure if we should get just this update or have a patch/patchset > that fixes the build. > > @Ophir, how the bpf file is compiled? And did you test it recently? > > I am using command from the documentation: > `clang -O2 -emit-llvm -c tap_bpf_program.c -o - | llc -march=bpf > -filetype=obj -o tap_bpf_program.o` > > > > @Aaron, should we add a simple build test around it, since this file is > not build by default with DPDK build? > > >> --- >> drivers/net/tap/tap_bpf_program.c | 4 ++-- >> drivers/net/tap/tap_rss.h | 2 +- >> 2 files changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/net/tap/tap_bpf_program.c b/drivers/net/tap/tap_bpf_program.c >> index 20c310e5e7ba..532e8838fe27 100644 >> --- a/drivers/net/tap/tap_bpf_program.c >> +++ b/drivers/net/tap/tap_bpf_program.c >> @@ -75,14 +75,14 @@ struct ipv4_l3_l4_tuple { >> __u32 dst_addr; >> __u16 dport; >> __u16 sport; >> -} __rte_packed; >> +} __attribute__((packed)); >> >> struct ipv6_l3_l4_tuple { >> __u8 src_addr[16]; >> __u8 dst_addr[16]; >> __u16 dport; >> __u16 sport; >> -} __rte_packed; >> +} __attribute__((packed)); >> >> static const __u8 def_rss_key[TAP_RSS_HASH_KEY_SIZE] = { >> 0xd1, 0x81, 0xc6, 0x2c, >> diff --git a/drivers/net/tap/tap_rss.h b/drivers/net/tap/tap_rss.h >> index 48c151cf6b68..dff46a012f94 100644 >> --- a/drivers/net/tap/tap_rss.h >> +++ b/drivers/net/tap/tap_rss.h >> @@ -35,6 +35,6 @@ struct rss_key { >> __u32 key_size; >> __u32 queues[TAP_MAX_QUEUES]; >> __u32 nb_queues; >> -} __rte_packed; >> +} __attribute__((packed)); >> >> #endif /* _TAP_RSS_H_ */ >