Re: mlxsw: spectrum: Introduce ACL core with simple TCAM implementation

2017-02-07 Thread Colin Ian King
Hi Jiri, mlxsw_sp_acl_tcam_chunk_create has an issue picked up by static analysis: 816struct mlxsw_sp_acl_tcam_chunk *chunk; 817int err; 818 CID 1400029 (#1 of 1): Operands don't affect result (CONSTANT_EXPRESSION_RESULT)result_independent_of_operands: priority == 184467440

[patch net-next v2 17/19] mlxsw: spectrum: Introduce ACL core with simple TCAM implementation

2017-02-03 Thread Jiri Pirko
From: Jiri Pirko Add ACL core infrastructure for Spectrum ASIC. This infra provides an abstraction layer over specific HW implementations. There are two basic objects used. One is "rule" and the second is "ruleset" which serves as a container of multiple rules. In general, within one ruleset the

Re: [patch net-next 17/19] mlxsw: spectrum: Introduce ACL core with simple TCAM implementation

2017-02-02 Thread Jiri Pirko
Thu, Feb 02, 2017 at 11:34:48PM CET, da...@davemloft.net wrote: >From: Jiri Pirko >Date: Thu, 2 Feb 2017 16:12:57 +0100 > >> +static int mlxsw_sp_acl_tcam_region_id_get(struct mlxsw_sp_acl_tcam *tcam, >> + u16 *p_id) >> +{ >> +u16 id; >> + >> +id = fi

Re: [patch net-next 17/19] mlxsw: spectrum: Introduce ACL core with simple TCAM implementation

2017-02-02 Thread David Miller
From: Jiri Pirko Date: Thu, 2 Feb 2017 16:12:57 +0100 > +static int mlxsw_sp_acl_tcam_region_id_get(struct mlxsw_sp_acl_tcam *tcam, > +u16 *p_id) > +{ > + u16 id; > + > + id = find_first_zero_bit(tcam->used_regions, tcam->max_regions); > + if (

[patch net-next 17/19] mlxsw: spectrum: Introduce ACL core with simple TCAM implementation

2017-02-02 Thread Jiri Pirko
From: Jiri Pirko Add ACL core infrastructure for Spectrum ASIC. This infra provides an abstraction layer over specific HW implementations. There are two basic objects used. One is "rule" and the second is "ruleset" which serves as a container of multiple rules. In general, within one ruleset the