It's time to look at some code. Let's take a look at some small portions of code for the Intel IXGB network adapter driver (which drives several Intel network adapters in the 82597EX series). Among the many available on the market, Intel has a product line called the IXGB network adapter. The controller is the Intel 82597EX; these are typically 10-gigabit ethernet adapters meant for servers (Intel's product brief on this controller can be found at https://www.intel.com/Assets/PDF/prodbrief/pro10GbE_LR_SA-DS.pdf):
Figure 4.1 – The Intel PRO/10GbE LR server adapter (IXGB, 82597EX) network adapter
First, let's take a look at it invoking request_irq() to allocate the IRQ line:
// drivers/net/ethernet/intel/ixgb/ixgb_main.c
[...]
int
ixgb_up(struct ixgb_adapter *adapter)
{
struct net_device *netdev = adapter->netdev;
int err, irq_flags = IRQF_SHARED;
...