From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BE953C25B75 for ; Fri, 31 May 2024 13:11:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 78A9E606CE; Fri, 31 May 2024 13:11:48 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id a6WKWJMFH_xt; Fri, 31 May 2024 13:11:47 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org B9FB1606D0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1717161107; bh=w0k6iv5heIvIEvsl1IPV4tbwTiNf/oihC32EQLReS1Q=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=6L8G1Y8Wx+RXuWjg9iUX7R9hdKbDsCH1lpITAYZWi6V7Rqywfbxrx6OlkO0fVBqjN Ko+owBzzfzQCCkZrymWy4e27jfltCO7SY1c9sL3QP6Zuk8w74mqWWXzwOfHzlncBrq 0AROpGrrgRxDuK19F4aOkLkeue/fafYuh4naZGJOo8Mc195VgJYBXU9T5Q3wh7e1/+ XR2UyLqvjdgXpL+O+RsMg89qOSyxvY3s6ixLAg8aZWFSNk/pKnvzHEgzVw2Uf8FnLF kzvFVa4UVHXa+nXLAWc47Qkc4fNRt9hvGb6mugqYBZuYx8ancZ/wBGG2UtAR7egLY/ 6a3GJma12zUpA== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id B9FB1606D0; Fri, 31 May 2024 13:11:47 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id DBFE91D528A for ; Fri, 31 May 2024 13:11:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id C41E140547 for ; Fri, 31 May 2024 13:11:45 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id tXu1yhoXlt-a for ; Fri, 31 May 2024 13:11:45 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2604:1380:4641:c500::1; helo=dfw.source.kernel.org; envelope-from=horms@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org C573340564 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org C573340564 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by smtp4.osuosl.org (Postfix) with ESMTPS id C573340564 for ; Fri, 31 May 2024 13:11:44 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 9BA4962415; Fri, 31 May 2024 13:11:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A2E3C116B1; Fri, 31 May 2024 13:11:41 +0000 (UTC) Date: Fri, 31 May 2024 14:11:39 +0100 From: Simon Horman To: Ahmed Zaki Message-ID: <20240531131139.GD123401@kernel.org> References: <20240527185810.3077299-1-ahmed.zaki@intel.com> <20240527185810.3077299-2-ahmed.zaki@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240527185810.3077299-2-ahmed.zaki@intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717161103; bh=+RxMHhYO/X4eUxC++M6brEN8NylFcxLydIy0tUrLLHo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QWktP+cA9ArMwKmdhpAPp+xzW+J6qnw7HK6IaT5DPMGQKTdhtQ9svUid06xCLX49R UPHcQa2PCDTeoaf9c1E1OmOwlxroOQfkMZPqQ1ezCoCO9wXax8Z3LYaX4roHdGJdF0 RdWeCfuHNZNAJBKwQDa1ictEr6nGRmQltAf/zJAS5m0/6ZOaiLlnaSNMZJvT8BliEY hjG69xo3g+g6NRcxv/NIxSPyfaGVnpW7wD4JqJQ7E5drnBcv2fa/jiZa1NK3N0cqXL 74eVIE/5G11pM2lfsZkHq3MOdbTaHEjd38KTjMCgppa0RFAbO8hYBs+KH9+zyFeIxf Z1x4VfKPG1N4w== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=QWktP+cA Subject: Re: [Intel-wired-lan] [PATCH iwl-next v2 01/13] ice: add parser create and destroy skeleton X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wojciech Drewek , Junfeng Guo , netdev@vger.kernel.org, Marcin Szycik , anthony.l.nguyen@intel.com, jacob.e.keller@intel.com, intel-wired-lan@lists.osuosl.org Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Mon, May 27, 2024 at 12:57:58PM -0600, Ahmed Zaki wrote: > From: Junfeng Guo > > Add new parser module which can parse a packet in binary and generate > information like ptype, protocol/offset pairs and flags which can be later > used to feed the FXP profile creation directly. > > Add skeleton of the create and destroy APIs: > ice_parser_create() > ice_parser_destroy() > > Reviewed-by: Marcin Szycik > Reviewed-by: Wojciech Drewek > Signed-off-by: Qi Zhang > Signed-off-by: Junfeng Guo > Co-developed-by: Ahmed Zaki > Signed-off-by: Ahmed Zaki ... > diff --git a/drivers/net/ethernet/intel/ice/ice_parser.c b/drivers/net/ethernet/intel/ice/ice_parser.c > new file mode 100644 > index 000000000000..b7865b6a0a9b > --- /dev/null > +++ b/drivers/net/ethernet/intel/ice/ice_parser.c > @@ -0,0 +1,31 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* Copyright (C) 2024 Intel Corporation */ > + > +#include "ice_common.h" > + > +/** > + * ice_parser_create - create a parser instance > + * @hw: pointer to the hardware structure > + * > + * Return a pointer to the allocated parser instance Hi Ahmed, A minor nit from my side. I think that in order to keep ./scripts/kernel-doc -none -Wall happy this should be: * Return: pointer to the allocated parser instance And perhaps it would be best to mention the error case too * Return: pointer to the allocated parser instance, or an error pointer > + */ > +struct ice_parser *ice_parser_create(struct ice_hw *hw) > +{ > + struct ice_parser *p; > + > + p = kzalloc(sizeof(*p), GFP_KERNEL); > + if (!p) > + return ERR_PTR(-ENOMEM); > + > + p->hw = hw; > + return p; > +} ...