Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp21662lqt; Thu, 18 Apr 2024 07:29:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVzdC8DqehqdV4gCN3JA+5MWukscq79xeFsmYTewAwOm8AdpqoiRqefKeHAsmfmAOzG2BTCbpwIJgRE7e3vADiABR0jP3lZsyTtCqRe7A== X-Google-Smtp-Source: AGHT+IHCR24mHSnyA9v5kSAHpgCl7ZNvCfP8M3KUROBOkMFK156bSVuuRLtnE/7r0QWS+KqpUR1w X-Received: by 2002:a05:6a00:2407:b0:6ea:c3bc:2031 with SMTP id z7-20020a056a00240700b006eac3bc2031mr3794660pfh.7.1713450555199; Thu, 18 Apr 2024 07:29:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713450555; cv=pass; d=google.com; s=arc-20160816; b=KlmKkPUzE/JvnozX8dXetLDnIg3tXoGU6C4DTHP1qCG3oID0gVUdePwdoSW6YJe0iY MMht3kR9/Fdbe4NwJD/tnA9J3qSyPq5dZlfDjfbscLtqtZ2aFfeboeD0Z1ufMhxKTmHm kEfswmdeMqZ0qVwURoa1iYHGgBuPBn+wbq+KG3GrZGPvDyvb4M0jqsNwxAOggK6CLRHc gf9L1V0HxVfSK4yaykgSjgdwq7PqdrXW05iW9kw6EiamfZgxjK3czN4udbe9UBQ5b0T4 47TpX6hocup+HIBTuJgzQcdY6Syorvjs0gsUuKoH9Y9uLgBQr6E5Z4Yn9Y5TM1iUomF1 8OBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=d7W/YpTIZxIdyewzNIraH7hxkKMvrK+9RnPBHoiRgYU=; fh=2MU5CJWI/DTXDVad7Wq4wviQMthdnhNl30TOApe65eQ=; b=lF8WPdy2M9CXG3Nev28t0cPvuUCpl2sbZYHqT4YQOuV9xIzvt6ueYaaImh6i3OYOPC yFX/g/L+4VOTCS4siV06vfDE0vaEP0G2ldGZlQjOXMiLMUHDkloljV0Aq8bVb4lKt0gs upiaUJq4+d4FXjVdBAtI1uTffrjcSdBp0+ojw/SpbIBffqMViI8XiZD9OPXL2KxTj5+z bw9f+J8OlAXF+4FunTx/RkotCw0iscnGXh7lOvad9+3il5s/nAi1AJrt5YefmTU3pEh7 nKDcTDfC5PVGBHqKpQjVZ4XBfjt5uEMiW4GWIcJmMy3aWRTeXPW05UzjzzhlWv5c3pUv Nnzw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="oVn8UC/W"; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-150298-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150298-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c8-20020aa78e08000000b006e6a5a72271si1544283pfr.403.2024.04.18.07.29.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 07:29:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150298-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="oVn8UC/W"; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-150298-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150298-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0C2E2284549 for ; Thu, 18 Apr 2024 14:26:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D281716C451; Thu, 18 Apr 2024 14:24:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="oVn8UC/W" Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A36C16ABC2; Thu, 18 Apr 2024 14:24:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713450274; cv=none; b=QJcgmFhxDK+PDCvAa9XuwY0Ft96l3lkNjx2T5AjElVgBPccITINRJC1m6Nq0ZTPboctj6P7Qm+torpGnMWbeZJRE5SHBzwKHAuReUJJx06/HBe/rxeV/CRSQ5qP6mkrxVGS7qZ7L2EYuejPjBwOax3HdF0YVcvI4RUGBDjn2Skc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713450274; c=relaxed/simple; bh=pH0PBRBEjyEaCCaHbzJ9ynfPi+tXKlFVFiy1Z9RjDgo=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Rq8/LbVSkpGm8sM4Y5XCyjvRCjcCH30dZGKedua6uQUDI63yAgAvGPL15lHCXrR1pD96ue3lmFGFrjx1DvwpDlJX9mRWxFM972NlTXJXTJyrEkp9AZX8ucwz3t0Wdw+fMjjn8AXljUfVUlYcmMssjLIsFTrJQrtU0wOAvY0qtgc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=oVn8UC/W; arc=none smtp.client-ip=198.47.19.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 43IENhfk047904; Thu, 18 Apr 2024 09:23:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1713450223; bh=d7W/YpTIZxIdyewzNIraH7hxkKMvrK+9RnPBHoiRgYU=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=oVn8UC/WraJiR9DfhqgRAMmWCKRPIN5gA4g9LgtVfHyr9ZYa0wpT1D1L9eCfM7V0I 1kGeA3ACt202+YA8etLSCi4dNNilaO9oBQFFqcvrsUeQegCCSt1xx61Wj3XLbh5lUN TOOZmxV7HXQassnk1lpdykUeIfQeyrSrA+F0zYJo= Received: from DLEE106.ent.ti.com (dlee106.ent.ti.com [157.170.170.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 43IENhFG118313 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 18 Apr 2024 09:23:43 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 18 Apr 2024 09:23:42 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 18 Apr 2024 09:23:42 -0500 Received: from localhost (uda0492258.dhcp.ti.com [172.24.227.9]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 43IENfLj049819; Thu, 18 Apr 2024 09:23:42 -0500 Date: Thu, 18 Apr 2024 19:53:41 +0530 From: Siddharth Vadapalli To: Julien Panis CC: Siddharth Vadapalli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Sumit Semwal , Christian =?utf-8?B?S8O2bmln?= , Simon Horman , Andrew Lunn , Ratheesh Kannoth , Naveen Mamindlapalli , Jacob Keller , , , , , , , , , Subject: Re: [PATCH net-next v9 0/3] Add minimal XDP support to TI AM65 CPSW Ethernet driver Message-ID: References: <20240223-am65-cpsw-xdp-basic-v9-0-2c194217e325@baylibre.com> <260d258f-87a1-4aac-8883-aab4746b32d8@ti.com> <08319f88-36a9-445a-9920-ad1fba666b6a@baylibre.com> <1da48c7e-ba87-4f7a-b6d1-d35961005ab0@ti.com> <7f7fb71a-6d15-46f1-b63c-b569a2e230b7@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7f7fb71a-6d15-46f1-b63c-b569a2e230b7@baylibre.com> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 On Thu, Apr 18, 2024 at 04:03:15PM +0200, Julien Panis wrote: > On 4/18/24 13:25, Siddharth Vadapalli wrote: > > On Thu, Apr 18, 2024 at 01:17:47PM +0200, Julien Panis wrote: > > > On 4/18/24 13:00, Siddharth Vadapalli wrote: > > > > On 12-04-2024 21:08, Julien Panis wrote: > > > > > This patch adds XDP support to TI AM65 CPSW Ethernet driver. > > > > > > > > > > The following features are implemented: NETDEV_XDP_ACT_BASIC, > > > > > NETDEV_XDP_ACT_REDIRECT, and NETDEV_XDP_ACT_NDO_XMIT. > > > > > > > > > > Zero-copy and non-linear XDP buffer supports are NOT implemented. > > > > > > > > > > Besides, the page pool memory model is used to get better performance. > > > > > > > > > > Signed-off-by: Julien Panis > > > > Hello Julien, > > > > > > > > This series crashes Linux on AM62ax SoC which also uses the > > > > AM65-CPSW-NUSS driver: > > > > https://gist.github.com/Siddharth-Vadapalli-at-TI/5ed0e436606001c247a7da664f75edee > > > > > > > > Regards, > > > > Siddharth. > > > Hello Siddharth. > > > > > > Thanks for the log. I can read: > > > [    1.966094] Missing net_device from driver > > > > > > Did you check that nodes exist in the device tree for the net devices ? > > Yes it exists. The device-tree used was also built with linux-next > > tagged next-20240417. The node corresponding to eth0 is cpsw_port1 which > > is present and enabled in the device-tree: > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts?h=next-20240417#n644 > > > > Regards, > > Siddharth. > > I could reproduce the bug by disabling 'cpsw_port2' in my device tree, > which is 'k3-am625-sk.dts' for the board I use. > > A condition is missing in am65_cpsw_create_xdp_rxqs() and > am65_cpsw_destroy_xdp_rxqs() functions. > > For these 2 functions, the code which is in the for loop should be > run only when port ethX is enabled. That's why it crashes with > your device tree (cpsw_port2 is disabled, which is not the case by > default for the board I developed with). > > I'll send a patch to fix the issue. Thanks for reporting it. Thank you for root-causing and working on the fix for this issue. Regards, Siddharth.