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 3323542EB7; Wed, 19 Jul 2023 12:00:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 096AC40E03; Wed, 19 Jul 2023 12:00:42 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2085.outbound.protection.outlook.com [40.107.93.85]) by mails.dpdk.org (Postfix) with ESMTP id 8575F40A80 for ; Wed, 19 Jul 2023 12:00:40 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hi1ZzZz7rrLy62C+HqCmAh2ImBz9X6+sOxBMSNu6S7+k7jn+coOT0beDrF26qC2fCH18a4Xq2PS7XgbKSCmEIzHMkzmdJKe9DdzVNvrXtRg7o1L7VgnnTHiHeFzavmOriCrdqyE/jjJurSPbpNjXJAxxRGzrvgyRsLChd6ML53ntUD21l9JAqvG48Tuko0G2OidNPSl0YOSxRjPEwIUTj1ajPRJWLFbkc1O6C5dcCR7hgvTHBlZv/H0y4nFMwMN4Lt35GQpp00eacK3wAks+DZBA4GVfiXSxYKtNph9/OpgGF5/1p/FWD1aq23xoJ0hfxDc/XbE5W9SLVyeDZRc8GA== 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=W4aDYNR6+az+9b+So9s7TB3MlN+PA9wwFsTMh99s2m8=; b=O72J9VhFUP0QBqMaoR98d9RX+NPsuE+CkPyTR1daNwa3fHx526JHEpH4WVqltm+p6VTwhcMsXSvUGFO+QkTa10zrOTi1dzXljIE286sCN7uF0wIpn24Y5ZBjjnyJvpzr8ZkdqI/1P2b/JmGLNYTwPZf6HC8jNWw1cpgEapmO2cmQ5hQcvBudT8Xrn8xsN6fHtpuOOfF2No7f7mVcVWRlrKk523BU5yHIGqk7xBqwQILVjpfZOR4BhU1F6XvIxB4CQ9taz2Yim0GxYnGyMuYG67hn5nBVagDBmtW3qWuGXBNlAly/ZnFuA8/ZHNkvmzKhWV8hc2mPkWxjhja4ZNadjQ== 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=W4aDYNR6+az+9b+So9s7TB3MlN+PA9wwFsTMh99s2m8=; b=qPvOFwU4PzYxIJAtmaqpOAtwPWRf6Q6CBRDzhw3XYnkEW12Ppsgnl1WqC0mJm+H6AOfkvfLk3VWugxSCho2MLASvcPRb7wErLGOho4KqmmIV1YjMOPWEzXnKzR5wKNZ6SMeXIu3CuARpXwJ4ESxLVrl0ZwbLVZ+qs9QZBvNpRXo= 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:00:38 +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:00:38 +0000 Message-ID: <3d8938a4-acb8-45d0-291b-133ba0157976@amd.com> Date: Wed, 19 Jul 2023 11:00:31 +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 To: Stephen Hemminger , Ophir Munk References: <20230717191548.16429-1-stephen@networkplumber.org> Cc: dev@dpdk.org, Thomas Monjalon , Aaron Conole , dpdklab , David Marchand From: Ferruh Yigit In-Reply-To: <20230717191548.16429-1-stephen@networkplumber.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0697.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:37b::12) 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: 8782df51-b074-4415-f6fb-08db883f008c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S1TA8f+FhXjfK2bRIdiRsARCTqXB4wfxEL4YIrYTkQY8Q4N1t7AYc0sAHd0NbfaJhBdTkQ4DFWTIZilKXMKLPleb9nlZH5POg1ncrpIWErneLxWVLm5TZ4UZCV/2E8Die03bJXDl7ERm/rGKaxhxEJ2AnfSw0TvPPogcjAy5A0QFghyuX4WL8j5PsoqSbg+lNCsEz+CQURDcOSrdDmL8dw92irkKliYPkkM9GceCDpAy2SJdz0ut3iN+lQ2pvTqPWWEU2BzPImoBvtTKzhqJ0JCvA6bflNKaJHD9PX6cEdlXVvgoqtWqth8l79i2R22SVexwer/YL01RTD20jOlPNUzv+cNOD79a26NpWRIX4rfGkdkkoaHM1HccmPE62ZBRVVeXXZyEbyOs5cL9MoUhjlEmmrC98ZAeO5ZFOUHaehFdObyU/Cn2yxQdv3pGRkn4lIeS4wvXu2ybBpiD3xR6pwB9k+apWzHEJ35DbA5m8BXxZfRBOzaoJlhCYJrQT+YKSMixtEWUjC26+gZA5OwfZXe/Aq6B7Ghqg1C2RfIlI1+Zau63devTAuW2PlcnWN222fM3AAUR8Cwn9O/yvPhZwclC9F2T+fPnsWDZ2BbEAcXIFWwFpPASkSG0AdonUn1TdW2uiOpuLTFFf2ukCOWX6g== 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?RzdXbjhyVElOMlgrclA2eWtLSmVyakhjRi9oL2pPK1JQMjQzTjBwa2orMy9F?= =?utf-8?B?OTI3cFU4amtBVEJOeXJlK2UzVWZ6RGZRTGsrZVhQaTR1REZyOURmbmw0Z1lv?= =?utf-8?B?RDVLa1ZLemlEeG5MRFJoTzlNNWU2UkRkQ2t1MFEwRU1COE81OWpiRVFiM1V0?= =?utf-8?B?bHpFRVhnWU9zYkF2a0Vqb1E1VEt0aVVOWEozUE1ySUt5ZktENURDUXhhWUxR?= =?utf-8?B?dTVnV2YvUkpYYTBwcG5tRTV5eGE1OFpCbGk0MWIxQXJ5UDQ5ekRWWWpUVWxT?= =?utf-8?B?dFRuKzFQZEhkTk9vSFg5SlU4RmczV25OSk5hNHEzWW5CTXBTSFlvNWVFcno3?= =?utf-8?B?WnpKZlZ0enoxbmJ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network-Message-Id: 8782df51-b074-4415-f6fb-08db883f008c 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:00:37.9202 (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: DoOsOOvvSvL52r1iAcJmYOeX1RyZw8uc2Mx6QA2b12CfgUCRkNesfz7BZK3ccumV 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/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 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_ */