Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp113464lqd; Tue, 23 Apr 2024 17:09:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVFpx218Uox8mAgOEtMpdpNsPIbRUZyQuuTtAzW8TERJBGSsktDP4E46WEZG+5EVucIX/dYlLRLakdyV4imlgWrqQnVabuZG1xDV/bp1w== X-Google-Smtp-Source: AGHT+IGUlBVnDc4IGBfDiVB+t+vOv+m6yrtN+FkkW5Z2We1bH0SNiRFgk12mTaRkYUhlvEb3Uv9d X-Received: by 2002:a17:902:6949:b0:1e7:e7ed:777e with SMTP id k9-20020a170902694900b001e7e7ed777emr1021185plt.20.1713917351663; Tue, 23 Apr 2024 17:09:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713917351; cv=pass; d=google.com; s=arc-20160816; b=EcXWCzs4lmid3ZdXj2R3aIFhIi4jiGLsgmLdt9OkLzrEGVkZ+3GAwhxbZ5QMVTEz/C Ogz7RYm59npPQFHS31IE5dtJUaTbh3tQZ1DrBt6f9vW0XBtKjS6a+kpcHcka2Cf9HVm9 kYJJaRlXSE112iTzAeH4sKD1wa39iKBtraLA1BbKVx1lZTe+4FvviLt+NQL0jN8fZ98e x3bdySV+AERhZrqOKC75B1UIiGtSHidkdqaf8/Tb4NZXbT3y1Iz9gW7QUH5mvWBh9EBi ZS3u8xshY+rGNM7OWsW9QbdEsFdzx3Go9BT+pynIS42546yX3uCWaiFcIGfdEDpl0LxK +OhQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uNVDC5QsEnqtExxfYsYIt46tMXYa2LHua1cwNhaeBw4=; fh=iT69aLAFCaAL1ECVELFGqnZRVt9iikoJcvzeKR1Ry4g=; b=bHiUju0JUXsMX6ga0u31QaFOiLvukJPigsKnXV6RGfXcBKDz5w8jKgeT4lRWsX0Che lXyXZBtJnpq90RgVqKuHZWnM6Wch9HD1rI0NRZRdTAgQXSNT6SbOArnsIxjBVja55DX4 JUXtmH5uu0V845720O1LyE4KOG+IC6O7abz3d8R+WTnTQC0DpWxa4f8vYQw2EC9AkpRP 8WnqBBUMH7riaoQKOsmf7sL1mTGrV9L7aXMxtxFTyw1RU+D81wHvfpsvLD8GHYFCipO0 PVhxELu4QMv2Ua5z57HRLi+0TpPN2e+do0Xdsdt/nLWr8PAUQoWThxRHfKzq370BLIAN yvWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=4bgLlrc9; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-156046-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156046-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id r17-20020a170903411100b001e454d1a5aasi9862075pld.403.2024.04.23.17.09.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 17:09:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156046-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=4bgLlrc9; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-156046-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156046-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 EA92828935D for ; Wed, 24 Apr 2024 00:09:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 754C223CB; Wed, 24 Apr 2024 00:08:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="4bgLlrc9" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 512EF803; Wed, 24 Apr 2024 00:08:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713917324; cv=none; b=pCbyIvDzeyp6LLZcxo1fmU68B/Br28AZ02dfZ8CNa/XYSWUDUKb/YyGeBKJnYR8ze7bccAIelkfG4zTypoWkrttBZnCIqOX6hCka8tT3AhmhPFPxVpldMso6GRLzzkmhA+F8w/ClJAShG106Khhl2dSyyCnGBXqgFkWjHuSMZA8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713917324; c=relaxed/simple; bh=qesWVnD2Ad3ta6cw21DlBfTA+jZa4ZaJdbNCsj04dqE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jhi9DeCe0pLX8+sPOUc7X5cFPs+WkCWT3fzyooMaU3Ivl5JN812yQ+tubbA/GuC74W2pimEmNeOSbT9GltA98WYhqwgg3dp9J8OvAiqnvVpR4wUyikbKzKvfwwiZ4pX86hNT9f9ZXDNb19Z5F4myenNK7CsJll6ycdMtp09Ajt8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=4bgLlrc9; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=uNVDC5QsEnqtExxfYsYIt46tMXYa2LHua1cwNhaeBw4=; b=4bgLlrc9+y6ie0N//k5D4qgxYj L369jntKjV0zhz2vD+jww0GjUevWKHsam1Ug42VzAnBLtKDN4NVi9LuQiyUB1KeMfePwIl6yXXoXW FKF8KMxdD+ghHMhirLzpNzCQSefCY3xyyiaxJfPzJmsajyweA2zKyPMO6RmMHicrAvGc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rzQBb-00DlLG-Te; Wed, 24 Apr 2024 02:08:31 +0200 Date: Wed, 24 Apr 2024 02:08:31 +0200 From: Andrew Lunn To: Parthiban Veerasooran Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, saeedm@nvidia.com, anthony.l.nguyen@intel.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, corbet@lwn.net, linux-doc@vger.kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, devicetree@vger.kernel.org, horatiu.vultur@microchip.com, ruanjinjie@huawei.com, steen.hegelund@microchip.com, vladimir.oltean@nxp.com, UNGLinuxDriver@microchip.com, Thorsten.Kummermehr@microchip.com, Pier.Beruto@onsemi.com, Selvamani.Rajagopal@onsemi.com, Nicolas.Ferre@microchip.com, benjamin.bigler@bernformulastudent.ch Subject: Re: [PATCH net-next v4 09/12] net: ethernet: oa_tc6: implement receive path to receive rx ethernet frames Message-ID: <574fec4d-5a23-490a-ba12-c40432ebe4b8@lunn.ch> References: <20240418125648.372526-1-Parthiban.Veerasooran@microchip.com> <20240418125648.372526-10-Parthiban.Veerasooran@microchip.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=us-ascii Content-Disposition: inline In-Reply-To: <20240418125648.372526-10-Parthiban.Veerasooran@microchip.com> > +static int oa_tc6_allocate_rx_skb(struct oa_tc6 *tc6) > +{ > + tc6->rx_skb = netdev_alloc_skb(tc6->netdev, tc6->netdev->mtu + ETH_HLEN + > + ETH_FCS_LEN + NET_IP_ALIGN); > + if (!tc6->rx_skb) { > + tc6->netdev->stats.rx_dropped++; > + return -ENOMEM; > + } > + skb_reserve(tc6->rx_skb, NET_IP_ALIGN); I think you can use netdev_alloc_skb_ip_align() here.