Skip to content

Commit 0c20f2d

Browse files
Andre Guedesanguy11
authored andcommitted
igc: Move igc_xdp_is_enabled()
Move the helper igc_xdp_is_enabled() to igc_xdp.h so it can be reused in igc_xdp.c by upcoming patches that will introduce AF_XDP zero-copy support to the driver. Signed-off-by: Andre Guedes <[email protected]> Signed-off-by: Vedang Patel <[email protected]> Signed-off-by: Jithu Joseph <[email protected]> Reviewed-by: Maciej Fijalkowski <[email protected]> Tested-by: Dvora Fuxbrumer <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent a49e72b commit 0c20f2d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

drivers/net/ethernet/intel/igc/igc_main.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -515,11 +515,6 @@ static int igc_setup_all_rx_resources(struct igc_adapter *adapter)
515515
return err;
516516
}
517517

518-
static bool igc_xdp_is_enabled(struct igc_adapter *adapter)
519-
{
520-
return !!adapter->xdp_prog;
521-
}
522-
523518
/**
524519
* igc_configure_rx_ring - Configure a receive ring after Reset
525520
* @adapter: board private structure

drivers/net/ethernet/intel/igc/igc_xdp.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ int igc_xdp_set_prog(struct igc_adapter *adapter, struct bpf_prog *prog,
1010
int igc_xdp_register_rxq_info(struct igc_ring *ring);
1111
void igc_xdp_unregister_rxq_info(struct igc_ring *ring);
1212

13+
static inline bool igc_xdp_is_enabled(struct igc_adapter *adapter)
14+
{
15+
return !!adapter->xdp_prog;
16+
}
17+
1318
#endif /* _IGC_XDP_H_ */

0 commit comments

Comments
 (0)