]> git.baikalelectronics.ru Git - kernel.git/commit
i40evf: allocate ring structs dynamically
authorMitch Williams <mitch.a.williams@intel.com>
Mon, 26 Oct 2015 23:44:40 +0000 (19:44 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 2 Dec 2015 06:56:30 +0000 (22:56 -0800)
commitb4370d8eb3e418fc5d3b2ab8ed943e7db980b516
tree1f1934e9de8a4ae53c58a55ab5ab93cf71a88d0d
parent65fb440d99a385f3ac13856e173144d4dc208970
i40evf: allocate ring structs dynamically

Instead of awkwardly keeping a fixed array of pointers in the adapter
struct and then allocating ring structs individually, just keep a single
pointer and allocate a single blob for the arrays. This simplifies code,
shrinks the adapter structure, and future-proofs the driver by not
limiting the number of rings we can handle.

Change-ID: I31334ff911a6474954232cfe4bc98ccca3c769ff
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40evf/i40e_txrx.c
drivers/net/ethernet/intel/i40evf/i40evf.h
drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
drivers/net/ethernet/intel/i40evf/i40evf_main.c
drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c