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 8BC06A00BE; Fri, 11 Feb 2022 12:31:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B51141144; Fri, 11 Feb 2022 12:31:33 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 8CC3340150 for ; Fri, 11 Feb 2022 12:31:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644579091; x=1676115091; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=8u7pifHPfZAFjIuE+heLNg5iTGEVVgD1/NCY025hU2k=; b=dejK4RnshFgLiGsdi/whUpNKgui252+zNpoB46V/bJEPQDqDreppR9M1 86qUwxHCbLZmuZ+4R5JQaWgAXsZ1B/0NElZbms/O79/dxCYKfp+MZSI+I TB0kXmsNl+oPKTyaMLqGckW+9ILZITc1GwjHF1DdkDepzZ95Jm4Q0L02a ycnSDqPanZoYHDzL2BRex9fOQ0vn4bIOmlHw4RyOaKjnnMadjNgeLzcfA HWb2U/XGAO+ezpqNh63gXdQnOdBUnZx+PPRKjaJeHGCOhZJMMD3aH/Hl0 24VbwnurUt83dtfyGExjsqELa54UoJTVqCb2ZNrQDSBT/JX8OLFaG7JVt A==; X-IronPort-AV: E=McAfee;i="6200,9189,10254"; a="336137769" X-IronPort-AV: E=Sophos;i="5.88,360,1635231600"; d="scan'208";a="336137769" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2022 03:31:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,360,1635231600"; d="scan'208";a="630255228" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga002.fm.intel.com with ESMTP; 11 Feb 2022 03:31:30 -0800 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Fri, 11 Feb 2022 03:31:30 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Fri, 11 Feb 2022 03:31:30 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Fri, 11 Feb 2022 03:31:29 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jGGB1/qw5o3DNgd1YR8WubCJXcd9xHNH8EU3bFiV85ucbRSZ4aqTqg8I7anomBpX0JvNRTCFTqzJzvC7Lkx5ctzr84J+QNt30stSq4f7T8KLl4W8a3/tFkhGX2BErOsL78buEdurDE0dQIvhAeaFTIvnoysiLnVAKjN0NTDHcA+b5qeYxklaE7MuvXUMIRomEFWKxklDHWWud7Y2bMk4rziTvZ7gLPYKcpe5Zy1fcNk5ZGNNlY3xuYxHjyFGGM5KxavRmMP2BAQlU6CBfokPdpyblFrgdEymkBCKvJj/9QK6t1X3puuD959FeZjDblthJAsVJ+1fj9QEKycbvQYdFA== 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=T1R9UgloSlvTw6v9pWmwtLnz2xW1WGjPoFuLZib5SqQ=; b=fQ3pAQgZaDKGJFKfUFrUXXGWJxXzFlfLYwHArv2BL9MGaRg4mM2QnzZFFV1WDseye8jy8lFe4tH2lOdmn9wPXwn+moL9fH8j0h2kTEaqN/29hNeebXXAwT2Cn9EHKb09/2ZN2FOVS/ebhBQbOoDFHZfRJCDuCDcb29kGn0Di7Kq4rlgxnlmhCyq6VtmVk9PFqvF0gqFn2y3DqXrpVQzqTTAYUL/MTKimcDigrTYlc+inVecA0gNtzm6b6MYRujJNEmXLJYBmmRxu5mbL3I59LcLlUNbTJdbsudTmZdZQLoHlmOdMlS0YT2kqf1MIlFFXNxg7CGifdf87IfvD/ENGuQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Fri, 11 Feb 2022 11:31:28 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2%4]) with mapi id 15.20.4975.011; Fri, 11 Feb 2022 11:31:28 +0000 Message-ID: <5be0e067-65c5-8ecf-13ff-b9110bfbee3d@intel.com> Date: Fri, 11 Feb 2022 11:31:22 +0000 Content-Language: en-US To: "Loftus, Ciara" , "dev@dpdk.org" CC: "stephen@networkplumber.org" , "Burakov, Anatoly" , "Singh, Aman Deep" References: <20220208134800.52142-1-ciara.loftus@intel.com> <20220209094808.41464-1-ciara.loftus@intel.com> <7f0c4a88-3477-a53d-7510-875e3d3789f1@intel.com> From: Ferruh Yigit Subject: Re: [PATCH v4] net/af_xdp: re-enable secondary process support X-User: ferruhy In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0043.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:61::31) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 32e964e5-033d-4f31-1cfc-08d9ed520b0a X-MS-TrafficTypeDiagnostic: PH0PR11MB5657:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:118; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T8bsBsqHgvDjB7R381CoD7afP0ABtRkdVk5mM1kDDFxxpl1Sz1t81bFETLqx/fZuHj89GK0Phz2uTNA1h8cmmqZNBKKZqvFkP1mCsh4DMCSgwqWL3lGGNg0GLi4kLACiptlWLVGn6zHBf6n6RtWikPfP7zjzxqXxu5C7NwIkhsaXx2lM/jaR6ebaghbhSEp4RtBWeBqamKif5jOiKus8HeqyCit2eRq0WCmqldbVZ3YhEcOIazNU2A5BLFnSxb1bHmPf9UHN5XlbNvou21vREdhe7mz7I4YYdDnekHRLwTfnSZPlmbJ6TMI7NK3mwDGDPkDBBgYZFcAQDOHDpWbhurJWp00cwPn0l1GyIfFqUCPFy8VxQqjxXj2l4NHXTm48sSJ1ZePX+IsrnMqaiS4IBzcrriVE1jLzZlSYqbRdUDcCoqbuOsR8GOGkk+fk3dAE6r9RfF7t2fxdbHxKoyVDaVGEhsNaED/rUQStQEP/F/ssvl5xsnwoFWNkEQPIcVvYso6qGIEjoDLXsvz0vmXGb1buOlWQS5X701Oc8Bfl7CsKqyRYTQE0iCn7nY7n3+fzvlxj+O7CTcCwrqtsHeiZH7zEUwsxrqWBPWMRIDFxxRiH2QiYdo2LZZf1LZ3SDoWm5OOIiN0uWS7F0IS1FSlbvGBUnubYulrfvS3qsvtMVUfi/oc8klm8QrzjmoxiVhJF2Jg7UZSohmIsPfLvx7TukYWZGbxJHnvd8pCgX0+ZcqOKUqZyzaei7bXmXGKkbFfWU/n9n6IxfZuhHzdWHtNt9fjTfB7UPTs0iXGhvG7bWTrp4+kTTPd+dpruBOpI+RvZQNOToegWXKlz4XaFG8elCQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(84040400005)(6486002)(966005)(26005)(83380400001)(186003)(36756003)(107886003)(31686004)(2616005)(508600001)(54906003)(66556008)(66946007)(2906002)(5660300002)(4326008)(86362001)(8676002)(31696002)(66476007)(110136005)(6506007)(6512007)(82960400001)(55236004)(53546011)(6666004)(316002)(44832011)(8936002)(38100700002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZUo1R3o3SXVPNzU3b25CZytVNDhJVW5Rcldsek1PQWUvcS9UZWQwZ1hEZjk2?= =?utf-8?B?TkQ1S2J1NG9DVHhZQUZrNTUrN2ZJeC9nQWtSVnVrUmxBY1JXc1hYNyswK2xk?= =?utf-8?B?WlEzUHhmL2UybFV3OGtCZUgvb0ZwSWhzQnNqOUNmZCtQdmdwRkp6NzVFMU8x?= =?utf-8?B?aXFQbUNyUzNMWmVUajFoSlROV0pJdW9iMmRQanVRNzh6eFAzUDNCSEQ5cmxC?= =?utf-8?B?RTZBZ1l2ZWEraXNtb3lpWGQ4Q3c4SUw5eVhJaXRlVUpZbHRwQ2RudFc1cDBN?= =?utf-8?B?RTdWblRNTUVkVExkb2kvMGNhL3NI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MHdLRTJs?= =?utf-8?B?MWwranVyZEhoWjl1T1EzMEVQcEpjbHZMN3RhMHo2UWRMVHpJQXZUZ3hSZlpH?= =?utf-8?Q?FnXkKdlhbhF2thiwenDpdgQ=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 32e964e5-033d-4f31-1cfc-08d9ed520b0a X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 11:31:28.1446 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pB8wb9aq0UOJkQvsCgXLAQFfozH1sD7XmJiLU5ObllWI5I/IT3yR19WaXurtL09OKIPigMbVmSQlGbMDP1DTow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5657 X-OriginatorOrg: intel.com 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 2/11/2022 7:28 AM, Loftus, Ciara wrote: >> >> On 2/10/2022 5:47 PM, Loftus, Ciara wrote: >>>> Subject: Re: [PATCH v4] net/af_xdp: re-enable secondary process support >>>> >>>> On 2/10/2022 3:40 PM, Loftus, Ciara wrote: >>>>>> Subject: Re: [PATCH v4] net/af_xdp: re-enable secondary process >> support >>>>>> >>>>>> On 2/9/2022 9:48 AM, Ciara Loftus wrote: >>>>>>> Secondary process support had been disabled for the AF_XDP PMD >>>>>> because >>>>>>> there was no logic in place to share the AF_XDP socket file descriptors >>>>>>> between the processes. This commit introduces this logic using the >> IPC >>>>>>> APIs. >>>>>>> >>>>>>> Rx and Tx are disabled in the secondary process due to memory >> mapping >>>> of >>>>>>> the AF_XDP rings being assigned by the kernel in the primary process >>>> only. >>>>>>> However other operations including retrieval of stats are permitted. >>>>>>> >>>>>>> Signed-off-by: Ciara Loftus >>>>>>> >>>>>> >>>>>> Hi Ciara, >>>>>> >>>>>> When I tried to test the patch getting following error [1], it doesn't look >>>>>> related to this patch but can you help to fix the issue, thanks. >>>>>> >>>>>> [1] >>>>>> libxdp: Couldn't find a BPF file with name xsk_def_xdp_prog.o >>>>>> xsk_configure(): Failed to create xsk socket. >>>>>> eth_rx_queue_setup(): Failed to configure xdp socket >>>>>> Fail to configure port 2 rx queues >>>>>> EAL: Error - exiting with code: 1 >>>>> >>>>> >>>>> Hi Ferruh, >>>>> >>>>> This file should be generated when libxdp is compiled. >>>>> Mine is located @ /usr/local/lib/bpf/xsk_def_xdp_prog.o >>>>> Can you check if that file is there for you? It could be in >>>> /usr/local/lib64/bpf/ on your machine. >>>>> What kernel are you running on? >>>>> >>>> >>>> It is in: /usr/local/lib64/bpf/xsk_def_xdp_prog.o >>>> >>>> I had to compile libxdp from source because OS package version was old >>>> to work with af_xdp. >>>> Is something required to point location of this file to af_xdp PMD? >>>> >>>> I run kernel: >>>> 5.15.16-200.fc35.x86_64 >>> >>> I read through the libxdp code to figure out what happens when searching >> for the file: >>> https://github.com/xdp-project/xdp- >> tools/blob/v1.2.2/lib/libxdp/libxdp.c#L1055 >>> >>> secure_getenv(XDP_OBJECT_ENVVAR) is called which according to the >> README "defaults to /usr/lib/bpf (or /usr/lib64/bpf on systems using a split >> library path)". >>> If that fails, BPF_OBJECT_PATH will be searched, which points to >> /usr/lib/bpf >>> >>> I discovered that on my system the getenv() call fails, but the file is >> eventually found because luckily BPF_OBJECT_PATH points to the >> appropriate place for me (lib): >>> https://github.com/xdp-project/xdp-tools/blob/v1.2.2/lib/util/util.h#L24 >>> I suspect the same failure is happening for you, but since >> BPF_OBJECT_PATH points to lib and not lib64, the file is not found. >>> As a temporary measure can you create a symlink in /usr/local/lib/bpf/ to >> point to /usr/local/lib/bpf/xsk_def_xdp_prog.o >>> I will investigate the libxdp issue further. Maybe a change is needed in the >> library. If a change or setup recommendation is needed in DPDK I will create a >> patch. >>> >> >> >> I don't have XDP_OBJECT_ENVVAR or BPF_OBJECT_PATH environment >> variables set, >> if they should be we should document them. >> >> When I created '/usr/local/lib/bpf/' link, the BPF file found. >> This should be clarified/documented for users. > > Ok. Ideally we shouldn't have to create the symlink. I will look for a better solution and submit a patch. > The symlink might be a temporary solution if another solution is not found. > ack >> >> >> And still observing following two: >> >> 1) I don't know what following log means: >> Configuring Port 2 (socket 0) >> libbpf: elf: skipping unrecognized data section(7) .xdp_run_config >> libbpf: elf: skipping unrecognized data section(8) xdp_metadata >> libxdp: XDP flag not supported by libxdp. >> libbpf: elf: skipping unrecognized data section(8) xdp_metadata >> libbpf: elf: skipping unrecognized data section(8) xdp_metadata > > I reported this and a patch was submitted to libbpf to demote those logs: > https://www.spinics.net/lists/bpf/msg49140.html > It looks like the patch never made it. I'll chase it up. thanks > Anyway, the logs can be ignored as they are not errors. > Should we document this? >> >> 2) When I try to create two af_xdp interface, I only got one: >> "--vdev net_af_xdp,iface=enp24s0f1 --vdev net_af_xdp,iface=enp24s0f0" > > This is also expected as you haven't given each vdev a unique name. Try: > "--vdev net_af_xdp0,iface=enp24s0f1 --vdev net_af_xdp1,iface=enp24s0f0" > Yes of course :(, it works now, and I did verify the proc-info stats works. > Thank you for the testing. > > Ciara > >> >> >> Thanks, >> ferruh