Skip to content

Commit a421370

Browse files
committed
Merge branch 'intel-wired-lan-driver-updates-for-2023-10-23-iavf'
Jacob Keller says: ==================== Intel Wired LAN Driver Updates for 2023-10-23 (iavf) This series includes iAVF driver cleanups from Michal Schmidt. Michal removes and updates stale comments, fixes some locking anti-patterns, improves handling of resets when the PF is slow, avoids unnecessary duplication of netdev state, refactors away some duplicate code, and finally removes the never-actually-used client interface. Changes since v1: * Dropped patch ("iavf: in iavf_down, disable queues when removing the driver") which was applied directly to net. * Fixed a merge conflict due to 7db3111 ("iavf: initialize waitqueues before starting watchdog_task"). V1 was originally posted at: https://lore.kernel.org/netdev/[email protected]/T/#mfadbdb39313eeccc616fdee80a4fdd6bda7e2822 ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 6479c97 + 36d0395 commit a421370

File tree

6 files changed

+28
-900
lines changed

6 files changed

+28
-900
lines changed

drivers/net/ethernet/intel/iavf/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ obj-$(CONFIG_IAVF) += iavf.o
1313

1414
iavf-objs := iavf_main.o iavf_ethtool.o iavf_virtchnl.o iavf_fdir.o \
1515
iavf_adv_rss.o \
16-
iavf_txrx.o iavf_common.o iavf_adminq.o iavf_client.o
16+
iavf_txrx.o iavf_common.o iavf_adminq.o

drivers/net/ethernet/intel/iavf/iavf.h

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ struct iavf_vsi {
6363
DECLARE_BITMAP(state, __IAVF_VSI_STATE_SIZE__);
6464
int base_vector;
6565
u16 qs_handle;
66-
void *priv; /* client driver data reference. */
6766
};
6867

6968
/* How many Rx Buffers do we bundle into one write to the hardware ? */
@@ -256,7 +255,6 @@ struct iavf_adapter {
256255
struct work_struct reset_task;
257256
struct work_struct adminq_task;
258257
struct work_struct finish_config;
259-
struct delayed_work client_task;
260258
wait_queue_head_t down_waitqueue;
261259
wait_queue_head_t reset_waitqueue;
262260
wait_queue_head_t vc_waitqueue;
@@ -265,7 +263,6 @@ struct iavf_adapter {
265263
int num_vlan_filters;
266264
struct list_head mac_filter_list;
267265
struct mutex crit_lock;
268-
struct mutex client_lock;
269266
/* Lock to protect accesses to MAC and VLAN lists */
270267
spinlock_t mac_vlan_list_lock;
271268
char misc_vector_name[IFNAMSIZ + 9];
@@ -282,10 +279,6 @@ struct iavf_adapter {
282279
u64 hw_csum_rx_error;
283280
u32 rx_desc_count;
284281
int num_msix_vectors;
285-
int num_rdma_msix;
286-
int rdma_base_vector;
287-
u32 client_pending;
288-
struct iavf_client_instance *cinst;
289282
struct msix_entry *msix_entries;
290283

291284
u32 flags;
@@ -294,10 +287,6 @@ struct iavf_adapter {
294287
#define IAVF_FLAG_RESET_PENDING BIT(4)
295288
#define IAVF_FLAG_RESET_NEEDED BIT(5)
296289
#define IAVF_FLAG_WB_ON_ITR_CAPABLE BIT(6)
297-
#define IAVF_FLAG_SERVICE_CLIENT_REQUESTED BIT(9)
298-
#define IAVF_FLAG_CLIENT_NEEDS_OPEN BIT(10)
299-
#define IAVF_FLAG_CLIENT_NEEDS_CLOSE BIT(11)
300-
#define IAVF_FLAG_CLIENT_NEEDS_L2_PARAMS BIT(12)
301290
#define IAVF_FLAG_LEGACY_RX BIT(15)
302291
#define IAVF_FLAG_REINIT_ITR_NEEDED BIT(16)
303292
#define IAVF_FLAG_QUEUES_DISABLED BIT(17)
@@ -377,7 +366,6 @@ struct iavf_adapter {
377366
unsigned long crit_section;
378367

379368
struct delayed_work watchdog_task;
380-
bool netdev_registered;
381369
bool link_up;
382370
enum virtchnl_link_speed link_speed;
383371
/* This is only populated if the VIRTCHNL_VF_CAP_ADV_LINK_SPEED is set
@@ -389,11 +377,6 @@ struct iavf_adapter {
389377
u32 link_speed_mbps;
390378

391379
enum virtchnl_ops current_op;
392-
#define CLIENT_ALLOWED(_a) ((_a)->vf_res ? \
393-
(_a)->vf_res->vf_cap_flags & \
394-
VIRTCHNL_VF_OFFLOAD_RDMA : \
395-
0)
396-
#define CLIENT_ENABLED(_a) ((_a)->cinst)
397380
/* RSS by the PF should be preferred over RSS via other methods. */
398381
#define RSS_PF(_a) ((_a)->vf_res->vf_cap_flags & \
399382
VIRTCHNL_VF_OFFLOAD_RSS_PF)
@@ -461,12 +444,6 @@ struct iavf_adapter {
461444

462445
/* Ethtool Private Flags */
463446

464-
/* lan device, used by client interface */
465-
struct iavf_device {
466-
struct list_head list;
467-
struct iavf_adapter *vf;
468-
};
469-
470447
/* needed by iavf_ethtool.c */
471448
extern char iavf_driver_name[];
472449

@@ -570,11 +547,6 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
570547
int iavf_config_rss(struct iavf_adapter *adapter);
571548
int iavf_lan_add_device(struct iavf_adapter *adapter);
572549
int iavf_lan_del_device(struct iavf_adapter *adapter);
573-
void iavf_client_subtask(struct iavf_adapter *adapter);
574-
void iavf_notify_client_message(struct iavf_vsi *vsi, u8 *msg, u16 len);
575-
void iavf_notify_client_l2_params(struct iavf_vsi *vsi);
576-
void iavf_notify_client_open(struct iavf_vsi *vsi);
577-
void iavf_notify_client_close(struct iavf_vsi *vsi, bool reset);
578550
void iavf_enable_channels(struct iavf_adapter *adapter);
579551
void iavf_disable_channels(struct iavf_adapter *adapter);
580552
void iavf_add_cloud_filter(struct iavf_adapter *adapter);

0 commit comments

Comments
 (0)