[intelxl] Handle admin events via a callback

The physical and virtual function drivers each care about precisely
one admin queue event type.  Simplify event handling by using a
per-driver callback instead of the existing weak function symbol.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2022-08-11 14:53:54 +01:00
parent 9e46ffa924
commit 67f8878e10
3 changed files with 43 additions and 30 deletions
+11 -4
View File
@@ -1103,6 +1103,17 @@ struct intelxl_nic {
struct intelxl_ring rx;
/** Receive I/O buffers */
struct io_buffer *rx_iobuf[INTELXL_RX_NUM_DESC];
/**
* Handle admin event
*
* @v netdev Network device
* @v evt Event descriptor
* @v buf Data buffer
*/
void ( * handle ) ( struct net_device *netdev,
struct intelxl_admin_descriptor *evt,
union intelxl_admin_buffer *buf );
};
extern int intelxl_msix_enable ( struct intelxl_nic *intelxl,
@@ -1129,8 +1140,4 @@ extern int intelxl_transmit ( struct net_device *netdev,
struct io_buffer *iobuf );
extern void intelxl_poll ( struct net_device *netdev );
extern void intelxlvf_admin_event ( struct net_device *netdev,
struct intelxl_admin_descriptor *evt,
union intelxl_admin_buffer *buf );
#endif /* _INTELXL_H */