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 CA0FEA00BE; Thu, 10 Feb 2022 21:12:44 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A558640140; Thu, 10 Feb 2022 21:12:44 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id C94A54013F for ; Thu, 10 Feb 2022 21:12:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644523963; x=1676059963; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=9H5kKPpAjx4fJcLI8OLYtPnAmo2OtJFuvnJT5zZB7bk=; b=bkpCeVFK9zmoL0fNHu7Fk85MA5JqCP+6uizOIxQE2D9Mmfr+orD6d5Wz G6ZNMm/Kcq8iw7ut0OlaRPfsL/U12pdUjOINFrJzTcKO5gX5W8ErtKt7r NopjrgbBwPZp5S3VHP7wL8gxZmPze+CQvkM+h0dPEqoc8Gq6CN4+0s4pI 2IvvDLAWSvEeYf4vbGd217UKvvDHa/Yd4fz+wbXCmLUbHqd7RGWVtr4D7 M4+qCAgi0P/gFa4g+Mi9q0Y2m5uRNL0mcJ8O06L3EpccKJ06oqkmwENbV N6+yAVnXp00x8UJ2UVTYWOMzGp5Rf+nLYpFs0UgjPMK3SRajvF2FnDqAy Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10254"; a="230227885" X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="230227885" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 12:12:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="774000543" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga005.fm.intel.com with ESMTP; 10 Feb 2022 12:12:41 -0800 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) 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; Thu, 10 Feb 2022 12:12:41 -0800 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 10 Feb 2022 12:12:40 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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 via Frontend Transport; Thu, 10 Feb 2022 12:12:40 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.176) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Thu, 10 Feb 2022 12:12:40 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d7AsQQXwq7+ZBaqreML+g0BIQnxaFTPshi2PR2j5yoLMfxgRJAELIR/Tzb+st3vqZ4hWvp/2DsvqpJCWLBOIfL9yZ7wiPfX4LeDpFYvik45pzLo8G7C2lZacbg7QQkoAIDxzRSNukHpYvqIDT7BrtOuN9LeuYmkubZwe4lgZUeFXwoHgl30GERBtmtUo0Td39ADM+5URz51SeHYOPlZvXvpicK4AA/5JEqsNXaqRuV+JhEZ3kN8M541fHHWBQwS+0jz0aqWn3GBS1dUKB6MBGycqdpvn2fabQzEeMcQnZqPbAcAX+miLrto46OxYGnk+NRFTIfYhBoyZP2PgPv+aTA== 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=gar21CqpqY/jUeRTTctaaJ7iR8ZH8OPpf1j8MmUp3w8=; b=BGjAqmFBbbbeSvZPNhXfwz1HgRl7fkKRMvwsXhtxO87WaC5r+uRcU/w7+j4zE8w/ApQ3A4I6h1E6wZL0QovlNtBCAxbzJq7+eIeqpnWpagUlNLds8ayHcYE7r2GdaklF173zkeS036wz4P1ON2FKqdDRqg194TkePkW5AKbuvx+E5j6Yu5/qP1XZr37DbTOvT+PeQK7lSxBA62ssGCgaPZzCPZEX9PO20PU18G2FHik9eiEuerEWoFStUyKKTqD+mDiAuczigIs4/GdPw+Cx9W4qFAax+1bP/umkJuwyQERaSnz1sgTo0AJ1dJiCmgMBQkjiqSiZXb0UPlhUqk+bag== 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 CY4PR1101MB2230.namprd11.prod.outlook.com (2603:10b6:910:1c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17; Thu, 10 Feb 2022 20:12:38 +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; Thu, 10 Feb 2022 20:12:38 +0000 Message-ID: <7f0c4a88-3477-a53d-7510-875e3d3789f1@intel.com> Date: Thu, 10 Feb 2022 20:12:32 +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> 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: LNXP265CA0020.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5e::32) 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: 744cae98-623f-4b5e-b6ca-08d9ecd1aee7 X-MS-TrafficTypeDiagnostic: CY4PR1101MB2230:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:72; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ce9/Wu469CUg1cguqPgyUzOU4Ca+GsxcJSevUBBSHVzHuZovgk4CzgIkDtThFWNJAohK7EaMePpPOHgjkLzYTBBjoIhUJuGLGdFlFF6bw7WXDIvbzqDbIHDNJfrRwSqT8KsMqw4fUDOKcme45jWpahk5E5/3PJZFwnQKlKLThiuPQwC+YRyrWngQAbDaqbz3aG1cDc/zuKACwIZIc3e0QBiOW37jIW1uBz2zJXXb6Kcu0dZF8n5CKwkO7VgwKWiSCqponOSztWzlz4hSF4SoXVxF0nqzx2kiu6oJEWKxarxb6Ui0GzJIKOcObCSfbdDrGCSivR7cvG0PoGLO81clO7RKhTF/Cipw01bXKPQyyL0wJDM62jYUgNJaDTflnR370aQemm9QYYX1s95LJj2Kz4J8zfu408F8lQJfBuuOBoCdh4rO4ZDgrZBV635VsTLI8BF9uSI8kqWgfbCGnTFd5N5mffa6IzgaG3bZSMEarMnpZBhCRbK+O+oc+CisSHdhVDBbs/eDrVfa5162JFxtB+7dydyayg+c1Gs6wSl40C/CmXoXq9hIHzPRSe63ZupHAFdmnZMzZrDPulJrG10ec2GJ8qaq1J8Xn0XC5lZT+tMSDo4SFfZwTW4OjfYHX85BQ8gtyH5Cjx7qLaH93LhueEGRvaJCBIcSoOs6J2111VkHA85cICsQbuzhriPTAgeHSPuixRqMxhEEVZDkO41hV3GAV433l41PMOT1ENQRxflwkRxaBq6S+G+KAOWbneb/UYDJYJmY5A0WFfDPxmxxd3uWnmP2UcEBSxiFDOJAwqdQ3FMsbhTqSD8BmO+OAUMO7aMiNSO43s2089nxWfN9iA== 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)(55236004)(54906003)(26005)(2906002)(5660300002)(66946007)(316002)(508600001)(44832011)(2616005)(107886003)(110136005)(36756003)(82960400001)(186003)(83380400001)(966005)(6506007)(6486002)(6512007)(31696002)(86362001)(31686004)(53546011)(8676002)(4326008)(66476007)(66556008)(6666004)(38100700002)(8936002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NFFla040NmV2MUd2OUM2K1IxVjhpZE1oV3ZyRTJmUGJJYWdETlZmRW5tdzVj?= =?utf-8?B?YVFEMmVQQjVXTkc1OVBVMGM2L0pvVlN1N29ObkhKQmYyVklJY2VDQ3VWNGJw?= =?utf-8?B?VFU5RGJ2TzNYNkE1eUhxQjlXRFhiYmRSUjFXMEdmZzR6NS9pTFNCVjVyOU5v?= =?utf-8?B?RkIxbUpQMjN1ZGFPYmcvTC9pck5veHg5cW9BYTJlZnZlTVB3Q3gyM05UWCs2?=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FMWU0rY0RvN0FQbEpDWEwvZ2hpRFErdjkzOXBRTlpqMW9JQVhL?= =?utf-8?B?U05CVnBPejJPOTFxUDdwOG1yVVRONUFqb1MzRk94WEMydkJsNTIwRW9Camh6?= =?utf-8?B?WlcreVBTZ3ZtdXhEOEV6TVc2WGhuVDkxczRvNHJJTU1IeU9RalhLR3R0VUxi?= =?utf-8?Q?aguEZEGuCd4Ah5Ke/M8OcHE=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 744cae98-623f-4b5e-b6ca-08d9ecd1aee7 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2022 20:12:37.9813 (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: R6iF2mK5cLWYTgLuSapAm/lEw4P/2ZWJi/yRyMcqQVB+7ULlo/ZW0OR2+4eQxR+O4usN1frj4pH5XcAZU2dxbA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2230 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/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. 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 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" Thanks, ferruh