[dpdk-dev] [PATCH v2 06/12] net/bnxt: combine default and regular flows

Ajit Khaparde ajit.khaparde at broadcom.com
Tue May 24 18:24:56 CEST 2022


On Tue, May 24, 2022 at 8:32 AM Ferruh Yigit <ferruh.yigit at amd.com> wrote:
>
> On 10/10/2020 5:11 AM, Ajit Khaparde wrote:
> > From: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
> >
> > The default and regular flows are stored in the same flow table
> > instead of different flow tables. This should help code reuse
> > and reducing the number of allocations.
> > So combine default and regular flows in flow database.
> >
> > Signed-off-by: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
> > Reviewed-by: Mike Baucom <michael.baucom at broadcom.com>
> > Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
>
> <...>
>
> >    *
> >    * returns 0 on success or negative number on failure
> >    */
> > -int32_t      ulp_flow_db_flush_flows(struct bnxt_ulp_context *ulp_ctx,
> > -                             uint32_t                idx)
> > +int32_t
> > +ulp_flow_db_flush_flows(struct bnxt_ulp_context *ulp_ctx,
> > +                     enum bnxt_ulp_fdb_type flow_type)
>
>
> Above change is causing build error [1] because the function declaration
> [2] differs from definition. Reproduced by latest gcc [3].
>
> [1]
> ../drivers/net/bnxt/tf_ulp/ulp_flow_db.c:962:1: error: conflicting types
> for ‘ulp_flow_db_flush_flows’ due to enum/integer mismatch;
> have ‘int32_t(struct bnxt_ulp_context *, enum bnxt_ulp_fdb_type)’
> {aka ‘int(struct bnxt_ulp_context *, enum bnxt_ulp_fdb_type)’}
> [-Werror=enum-int-mismatch]
>    962 | ulp_flow_db_flush_flows(struct bnxt_ulp_context *ulp_ctx,
>        | ^~~~~~~~~~~~~~~~~~~~~~~
> In file included from ../drivers/net/bnxt/tf_ulp/ulp_flow_db.c:12:
> ../drivers/net/bnxt/tf_ulp/ulp_flow_db.h:211:1: note: previous
> declaration of ‘ulp_flow_db_flush_flows’ with type ‘int32_t(struct
> bnxt_ulp_context *,uint32_t)’ {aka ‘int(struct bnxt_ulp_context *,
> unsigned int)’}
>    211 | ulp_flow_db_flush_flows(struct bnxt_ulp_context *ulp_ctx,
>        | ^~~~~~~~~~~~~~~~~~~~~~~
>
>
> [2]
> > +ulp_flow_db_flush_flows(struct bnxt_ulp_context *ulp_ctx,
> > +                     uint32_t idx);
> >
>
>
> [3]
> gcc 13.0.0 "gcc (GCC) 13.0.0 20220524 (experimental)")
Bleeding edge gcc.
Thanks Ferruh. We will take a look at this.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4218 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mails.dpdk.org/archives/dev/attachments/20220524/f443a40e/attachment.bin>


More information about the dev mailing list