> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of Simon
> Horman
> Sent: Friday, May 31, 2024 3:12 PM
> To: Zaki, Ahmed <[email protected]>
> Cc: Drewek, Wojciech <[email protected]>; Guo, Junfeng
> <[email protected]>; [email protected]; Marcin Szycik
> <[email protected]>; Nguyen, Anthony L
> <[email protected]>; Keller, Jacob E <[email protected]>; 
> intel-
> [email protected]
> Subject: Re: [Intel-wired-lan] [PATCH iwl-next v2 01/13] ice: add parser 
> create
> and destroy skeleton
> 
> On Mon, May 27, 2024 at 12:57:58PM -0600, Ahmed Zaki wrote:
> > From: Junfeng Guo <[email protected]>
> >
> > 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 <[email protected]>
> > Reviewed-by: Wojciech Drewek <[email protected]>
> > Signed-off-by: Qi Zhang <[email protected]>
> > Signed-off-by: Junfeng Guo <[email protected]>
> > Co-developed-by: Ahmed Zaki <[email protected]>
> > Signed-off-by: Ahmed Zaki <[email protected]>
> 
> ...
> 
> > 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;
> > +}
> 
> ...


Tested-by: Rafal Romanowski <[email protected]>


Reply via email to