Skip to content

Commit 0ef2d5a

Browse files
mawilli1Jeff Kirsher
authored and
Jeff Kirsher
committed
i40e: KISS the client interface
(KISS is Keep It Simple, Stupid. Or is it?) The client interface vastly overengineered for what it needs to do. It was originally designed to support multiple clients on multiple netdevs, possibly even with multiple drivers. None of this happened, and now we know that there will only ever be one client for i40e (i40iw) and one for i40evf (i40iwvf). So, time for some KISS. Since i40e and i40evf are a Dynasty, we'll simplify this one to match the VF interface. First, be a Destroyer and remove all of the lists and locks required to support multiple clients. Keep one static around to keep track of one client, and track the client instances for each netdev in the driver's pf (or adapter) struct. Now it's Almost Human. Since we already know the client type is iWarp, get rid of any checks for this. Same for VSI type - it's always going to be the same type, so it's just a Parasite. While we're at it, fix up some comments. This makes the function headers actually match the functions. These changes reduce code complexity, simplify maintenance, squash some lurking timing bugs, and allow us to Rock and Roll All Nite. Change-ID: I1ea79948ad73b8685272451440a34507f9a9012e Signed-off-by: Mitch Williams <[email protected]> Signed-off-by: Jacob Keller <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent ed0e894 commit 0ef2d5a

File tree

5 files changed

+179
-328
lines changed

5 files changed

+179
-328
lines changed

drivers/net/ethernet/intel/i40e/i40e.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,10 @@ struct i40e_pf {
348348
#define I40E_FLAG_TRUE_PROMISC_SUPPORT BIT_ULL(51)
349349
#define I40E_FLAG_HAVE_CRT_RETIMER BIT_ULL(52)
350350
#define I40E_FLAG_PTP_L4_CAPABLE BIT_ULL(53)
351-
#define I40E_FLAG_WOL_MC_MAGIC_PKT_WAKE BIT_ULL(54)
351+
#define I40E_FLAG_CLIENT_RESET BIT_ULL(54)
352352
#define I40E_FLAG_TEMP_LINK_POLLING BIT_ULL(55)
353+
#define I40E_FLAG_CLIENT_L2_CHANGE BIT_ULL(56)
354+
#define I40E_FLAG_WOL_MC_MAGIC_PKT_WAKE BIT_ULL(57)
353355

354356
/* tracks features that get auto disabled by errors */
355357
u64 auto_disable_flags;
@@ -358,6 +360,7 @@ struct i40e_pf {
358360
struct i40e_fcoe fcoe;
359361

360362
#endif /* I40E_FCOE */
363+
struct i40e_client_instance *cinst;
361364
bool stat_offsets_loaded;
362365
struct i40e_hw_port_stats stats;
363366
struct i40e_hw_port_stats stats_offsets;
@@ -813,8 +816,7 @@ void i40e_notify_client_of_l2_param_changes(struct i40e_vsi *vsi);
813816
void i40e_notify_client_of_netdev_close(struct i40e_vsi *vsi, bool reset);
814817
void i40e_notify_client_of_vf_enable(struct i40e_pf *pf, u32 num_vfs);
815818
void i40e_notify_client_of_vf_reset(struct i40e_pf *pf, u32 vf_id);
816-
int i40e_vf_client_capable(struct i40e_pf *pf, u32 vf_id,
817-
enum i40e_client_type type);
819+
int i40e_vf_client_capable(struct i40e_pf *pf, u32 vf_id);
818820
/**
819821
* i40e_irq_dynamic_enable - Enable default interrupt generation settings
820822
* @vsi: pointer to a vsi

0 commit comments

Comments
 (0)