Skip to content

Commit d27e31c

Browse files
committed
netmap_common_irq shall return int
netmap_common_irq should return an int code that indicates if the interrupt is going to be handled or not by Netmap
1 parent b24fce9 commit d27e31c

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

sys/dev/netmap/netmap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3094,7 +3094,7 @@ netmap_reset(struct netmap_adapter *na, enum txrx tx, u_int n,
30943094
* - for a nic connected to a switch, call the proper forwarding routine
30953095
* (see netmap_bwrap_intr_notify)
30963096
*/
3097-
void
3097+
int
30983098
netmap_common_irq(struct netmap_adapter *na, u_int q, u_int *work_done)
30993099
{
31003100
struct netmap_kring *kring;
@@ -3107,7 +3107,7 @@ netmap_common_irq(struct netmap_adapter *na, u_int q, u_int *work_done)
31073107
}
31083108

31093109
if (q >= nma_get_nrings(na, t))
3110-
return; // not a physical queue
3110+
return 0; // not a physical queue
31113111

31123112
kring = NMR(na, t) + q;
31133113

@@ -3116,6 +3116,7 @@ netmap_common_irq(struct netmap_adapter *na, u_int q, u_int *work_done)
31163116
*work_done = 1; /* do not fire napi again */
31173117
}
31183118
kring->nm_notify(kring, 0);
3119+
return 1;
31193120
}
31203121

31213122

@@ -3154,8 +3155,7 @@ netmap_rx_irq(struct ifnet *ifp, u_int q, u_int *work_done)
31543155
return 0;
31553156
}
31563157

3157-
netmap_common_irq(na, q, work_done);
3158-
return 1;
3158+
return netmap_common_irq(na, q, work_done);
31593159
}
31603160

31613161

sys/dev/netmap/netmap_kern.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ int netmap_ring_reinit(struct netmap_kring *);
11111111
/* default functions to handle rx/tx interrupts */
11121112
int netmap_rx_irq(struct ifnet *, u_int, u_int *);
11131113
#define netmap_tx_irq(_n, _q) netmap_rx_irq(_n, _q, NULL)
1114-
void netmap_common_irq(struct netmap_adapter *, u_int, u_int *work_done);
1114+
int netmap_common_irq(struct netmap_adapter *, u_int, u_int *work_done);
11151115

11161116

11171117
#ifdef WITH_VALE

0 commit comments

Comments
 (0)