[Intel-wired-lan] [PART1 PATCH 04/11] i40e: return immediately when failing to add fdir filter
Bowers, AndrewX
andrewx.bowers at intel.com
Mon Mar 6 17:44:03 UTC 2017
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Jacob Keller
> Sent: Monday, February 6, 2017 2:39 PM
> To: Intel Wired LAN <intel-wired-lan at lists.osuosl.org>
> Subject: [Intel-wired-lan] [PART1 PATCH 04/11] i40e: return immediately
> when failing to add fdir filter
>
> Instead of setting err=true and checking this to determine when to free the
> raw_packet near the end of the function, simply kfree and return
> immediately. The resulting code is a bit cleaner and has one less variable. This
> also resolves a subtle bug in the ipv4 case which could fail to add the first
> filter and then never free the memory, resulting in a small memory leak.
>
> Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
> Reviewed-by: Dayanand, Avinash <avinash.dayanand at intel.com>
> Reviewed-by: Brady, Alan <alan.brady at intel.com>
> Reviewed-by: Williams, Mitch A <mitch.a.williams at intel.com>
> Change-ID: I7583aac033481dc794b4acaa14445059c8930ff1
> ---
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 33 ++++++++++++--------------
> ---
> 1 file changed, 14 insertions(+), 19 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers at intel.com>
More information about the Intel-wired-lan
mailing list