RE: [Intel-wired-lan] [PATCH V2 net] ice: Re-organizes reqstd/avail {R, T}XQ check/code for efficiency+readability

2021-04-20 Thread Brelinski, TonyX
> -Original Message-
> From: Intel-wired-lan  On Behalf Of
> Salil Mehta
> Sent: Tuesday, April 13, 2021 3:45 PM
> To: da...@davemloft.net; k...@kernel.org
> Cc: salil.me...@huawei.com; linux...@openeuler.org;
> net...@vger.kernel.org; linux...@huawei.com; linux-
> ker...@vger.kernel.org; Jeff Kirsher ; intel-
> wired-...@lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH V2 net] ice: Re-organizes reqstd/avail {R,
> T}XQ check/code for efficiency+readability
> 
> If user has explicitly requested the number of {R,T}XQs, then it is
> unnecessary to get the count of already available {R,T}XQs from the PF
> avail_{r,t}xqs bitmap. This value will get overridden by user specified value 
> in
> any case.
> 
> This patch does minor re-organization of the code for improving the flow and
> readabiltiy. This scope of improvement was found during the review of the
> ICE driver code.
> 
> FYI, I could not test this change due to unavailability of the hardware.
> It would be helpful if somebody can test this patch and provide Tested-by
> Tag. Many thanks!
> 
> Fixes: 87324e747fde ("ice: Implement ethtool ops for channels")
> Cc: intel-wired-...@lists.osuosl.org
> Cc: Jeff Kirsher 
> Signed-off-by: Salil Mehta 
> --
> Change V1->V2
>  (*) Fixed the comments from Anthony Nguyen(Intel)
>  Link: https://lkml.org/lkml/2021/4/12/1997
> ---
>  drivers/net/ethernet/intel/ice/ice_lib.c | 14 --
>  1 file changed, 8 insertions(+), 6 deletions(-)

Tested-by: Tony Brelinski  (A Contingent Worker at 
Intel)




RE: [Intel-wired-lan] [PATCH][next] ice: Fix potential infinite loop when using u8 loop counter

2021-04-08 Thread Brelinski, TonyX
> -Original Message-
> From: Intel-wired-lan  On Behalf Of
> Colin King
> Sent: Wednesday, March 31, 2021 7:46 AM
> To: Brandeburg, Jesse ; Nguyen, Anthony L
> ; David S . Miller ;
> Jakub Kicinski ; Cao, Chinh T ;
> intel-wired-...@lists.osuosl.org; net...@vger.kernel.org
> Cc: kernel-janit...@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [Intel-wired-lan] [PATCH][next] ice: Fix potential infinite loop when
> using u8 loop counter
> 
> From: Colin Ian King 
> 
> A for-loop is using a u8 loop counter that is being compared to a u32
> cmp_dcbcfg->numapp to check for the end of the loop. If cmp_dcbcfg-
> >numapp is larger than 255 then the counter j will wrap around to zero and
> hence an infinite loop occurs. Fix this by making counter j the same type as
> cmp_dcbcfg->numapp.
> 
> Addresses-Coverity: ("Infinite loop")
> Fixes: aeac8ce864d9 ("ice: Recognize 860 as iSCSI port in CEE mode")
> Signed-off-by: Colin Ian King 
> ---
>  drivers/net/ethernet/intel/ice/ice_dcb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Tested-by: Tony Brelinski  A Contingent Worker at 
Intel




RE: [Intel-wired-lan] [PATCH RESEND][next] ice: Fix fall-through warnings for Clang

2021-03-09 Thread Brelinski, TonyX
> -Original Message-
> From: Intel-wired-lan  On Behalf Of
> Paul Menzel
> Sent: Friday, March 5, 2021 1:04 AM
> To: Gustavo A. R. Silva ; Brandeburg, Jesse
> ; Nguyen, Anthony L
> ; David S. Miller ;
> Jakub Kicinski 
> Cc: net...@vger.kernel.org; intel-wired-...@lists.osuosl.org; linux-
> harden...@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [Intel-wired-lan] [PATCH RESEND][next] ice: Fix fall-through
> warnings for Clang
> 
> Dear Gustavo,
> 
> 
> Thank you for working on that.
> 
> Am 05.03.21 um 09:52 schrieb Gustavo A. R. Silva:
> > In preparation to enable -Wimplicit-fallthrough for Clang, fix a
> > warning by explicitly adding a break statement instead of just letting
> > the code fall through to the next case.
> 
> It would be nice to have a short summary of the discrepancy between GCC
> and clang, and it was decided to go with the “clang decision”, and not have
> clang adapt to GCC.
> 
> > Link: https://github.com/KSPP/linux/issues/115
> > Signed-off-by: Gustavo A. R. Silva 
> > ---
> >   drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 1 +
> >   1 file changed, 1 insertion(+)

Tested-by: Tony Brelinski  A Contingent Worker at 
Intel