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 C4FEB42EB7; Wed, 19 Jul 2023 12:09:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A639540DFD; Wed, 19 Jul 2023 12:09:18 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2057.outbound.protection.outlook.com [40.107.93.57]) by mails.dpdk.org (Postfix) with ESMTP id 2E1F540A80 for ; Wed, 19 Jul 2023 12:09:17 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VqF/dEkDfhJEPV+7MSR0hrMAfRiNJ6XSH1hIvvpSzb+uTT/Y/2WlT/2JyITsqcPIQlxjNYp3CWXPPN+gGyBT/jd/985sLNYrn7KBbAde9P8xa05mIKPLTJXGl7i9FIjThd/kdAd2FAh2G6qhb9fZ80zwfcaLRBZGK4exjYcbBoH9IYNPZ2QahvZPnOM6WcZbMZDdfNRTNNoY0zUrzcgpxHktRnO8JzA0lfmAkJ22gO1McITavATo0+UOcJb6tDh+ByE3ovjJcsy/OuUFW8VBH/D3VkH7o2tEgn6As/p78lE3ByjOy4UU3kCVd3GouTyEqI3zpwC5Oe+c6dFMocN4Yg== 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=YnrFHPKF8/KSRUu+KTCGFtZOwDN9pJJTI7d2TFjG5Qw=; b=IQZO6aTU5/5aFax6uQITDN3Yf3JguvHGujUsjHWSG2wmSLwd8KWLn8xt/t4qpilgkJ16Cb+0aLCCcumaRyl3P6TpFlInc3oHrRcalPWs7beZBvY2mfxkiguS+yfKf9fa+AhgDDRGp+xtvqWZOUYQGKY3is68LvvJJ4oJKjNhbZgeTq59/A89y2WEpLDSifo78dS7tyPCsjmGuPNHh/q7gnkEagU1PRmpeGwOtDx6jMF+nB39n7iK9VI4AiBtgijIURT1D9ermXJMe/HEEcL6vnRiApN45PtZ5jy6J7SnBaMczRvVubKS37mKsMlQWifHaSQvutQjBVoQ25aWwYp2qA== 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=YnrFHPKF8/KSRUu+KTCGFtZOwDN9pJJTI7d2TFjG5Qw=; b=VxPIKfo8uB7jfOtX6Phj3CE0vpMh+9LFf76bR0pZ/5Bbp236z+eI0+5qFKMbu1oLgp9a6JP/X2ehunFYvvzm/qcTPv2ssf4G8FzOZYPZr7Bo5jLvT37jjkf3IYdqSf2zb1A2BFTUhCRzuxfbqLPYziOoY4b82eaSEWjYF58f/Zk= 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:09:15 +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:09:15 +0000 Message-ID: Date: Wed, 19 Jul 2023 11:09:08 +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> <75eef8f8-c0c0-1950-6149-756bd624e9d6@amd.com> In-Reply-To: <75eef8f8-c0c0-1950-6149-756bd624e9d6@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PR1P264CA0112.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:2cd::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: 1a82331d-ce66-4e7b-98fc-08db884034e6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZPwaxOWjbuWIqANSZsMc2DaXUKlrCV/JBoaCLpKt0f1SFoqlvUKnAXzUBSzHMYZbtY27QaFIFsAcqaTmLHqnb/Am+Rg1NQXJ0n+wzFO+/J3rOMU8xaTu2sxddwTVp1PC8YmUfu1PIPsYgPb7NOtpc2f3zG2dbAj4h2ufatmECmYXu/r5cmgDN+gfA+1wOVYAY2M2B1Hb7/MEmOEBY0X0gtxGLgXK1cyrHqGghHjvlVojX58yiDGukXSeDh4Pb5gnR183wmMOLTicOcQ/EKAdsPfJ84X83KhWCZ6m4rBzgJ5XAlQ5qP8CPE8FSXneh/BOfZ8n3uXWsLho4qat6o6Zo/mgB5DwlTNSU4EsDLI1j7VwQ911YZaCimiE6hWR6aJ+6gfrmGN/4k4g0/6ECXyEvlLvMd6ulIdI13aDQznpTJ7m9Cjfp+R7j8SttwiTe0Jx2yjFDYp1r7ID5PNEuBS3VrscXCEsyaoqBmP/vSsTSm/E5MqiI3vO52i3AF4qln82tVdsZ2kBtIOzDH4u0Yt2ymxiO+3hhD2JjHbN1T7O++TLhTkjOxIRhVr7jgq/fE7DkVPqImYnqclRvfje7tw/hNKjXDymunNCFdiIiezH975ysXdthIgrT5/SRxoAJwwh2h5eyAM3CCr7gFupTksJ9w== 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)(966005)(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?NmtWYTRUVGhaSnRWWVk1REVRd0VRb2xqVUJ1czlkbHVkbDU4NndZbi9RbzND?= =?utf-8?B?cGVHVE5ycHJkY3dxRHp6aXlDRWQyWlhiNUhIVXNIai94T0xNMnA4bGxjY1p0?= =?utf-8?B?bGludVlHZU5EdENLNmUvVCtwbHpubWFScEVrWXdJb3ErWjIzT3ZYRlZBMjhj?= =?utf-8?B?MFVaYm5lNjZqdmF4d0hJRnM2VldDS1NDMjltQU1qc3JvbTBlWnJTQi9OZDFi?= =?utf-8?B?bGMxTEVpN3lkSUZmZ1V2YnZFTWxFQkZqb09SQng5RVl3cDJJRExjUGRZTEpS?= =?utf-8?B?Q2dGMVZwRkdwUmQyWCtaZ0xJYnN1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?utf-8?Q?hx09ulrv7GS3ODLKYmLxiXHZM?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1a82331d-ce66-4e7b-98fc-08db884034e6 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:09:15.2091 (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: eVM6gSacmm/mn47z97P5Z8JQIDx7k0aVvwELosnglJ9ZyUxIh8mWsudYK/fPtEyA 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:03 AM, Ferruh Yigit wrote: > 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? >> I saw Stephen already touched to the topic: https://inbox.dpdk.org/dev/20230717083032.072b12c5@hermes.local/ >> >>> --- >>> 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_ */ >> >