Changeset View
Changeset View
Standalone View
Standalone View
sys/net/iflib.c
Show First 20 Lines • Show All 1,462 Lines • ▼ Show 20 Lines | SYSINIT(iflib_record_started, SI_SUB_SMP + 1, SI_ORDER_FIRST, | ||||
iflib_record_started, NULL); | iflib_record_started, NULL); | ||||
#endif | #endif | ||||
static int | static int | ||||
iflib_fast_intr(void *arg) | iflib_fast_intr(void *arg) | ||||
{ | { | ||||
iflib_filter_info_t info = arg; | iflib_filter_info_t info = arg; | ||||
struct grouptask *gtask = info->ifi_task; | struct grouptask *gtask = info->ifi_task; | ||||
int result; | |||||
if (!iflib_started) | if (!iflib_started) | ||||
return (FILTER_HANDLED); | return (FILTER_STRAY); | ||||
DBG_COUNTER_INC(fast_intrs); | DBG_COUNTER_INC(fast_intrs); | ||||
if (info->ifi_filter != NULL && info->ifi_filter(info->ifi_filter_arg) == FILTER_HANDLED) | if (info->ifi_filter != NULL | ||||
return (FILTER_HANDLED); | && (result = info->ifi_filter(info->ifi_filter_arg)) != FILTER_SCHEDULE_THREAD) | ||||
return result; | |||||
marius: "Values in return statements should be enclosed in parentheses" according to style(9),
same for… | |||||
GROUPTASK_ENQUEUE(gtask); | GROUPTASK_ENQUEUE(gtask); | ||||
return (FILTER_HANDLED); | return (FILTER_HANDLED); | ||||
} | } | ||||
static int | static int | ||||
iflib_fast_intr_rxtx(void *arg) | iflib_fast_intr_rxtx(void *arg) | ||||
{ | { | ||||
iflib_filter_info_t info = arg; | iflib_filter_info_t info = arg; | ||||
Show All 31 Lines | iflib_fast_intr_rxtx(void *arg) | ||||
else | else | ||||
cidx = rxq->ifr_fl[0].ifl_cidx; | cidx = rxq->ifr_fl[0].ifl_cidx; | ||||
if (iflib_rxd_avail(ctx, rxq, cidx, 1)) | if (iflib_rxd_avail(ctx, rxq, cidx, 1)) | ||||
GROUPTASK_ENQUEUE(gtask); | GROUPTASK_ENQUEUE(gtask); | ||||
else { | else { | ||||
IFDI_RX_QUEUE_INTR_ENABLE(ctx, rxq->ifr_id); | IFDI_RX_QUEUE_INTR_ENABLE(ctx, rxq->ifr_id); | ||||
DBG_COUNTER_INC(rx_intr_enables); | DBG_COUNTER_INC(rx_intr_enables); | ||||
} | } | ||||
return (FILTER_HANDLED); | return (FILTER_SCHEDULE_THREAD); | ||||
} | } | ||||
static int | static int | ||||
iflib_fast_intr_ctx(void *arg) | iflib_fast_intr_ctx(void *arg) | ||||
{ | { | ||||
iflib_filter_info_t info = arg; | iflib_filter_info_t info = arg; | ||||
struct grouptask *gtask = info->ifi_task; | struct grouptask *gtask = info->ifi_task; | ||||
int result; | |||||
if (!iflib_started) | if (!iflib_started) | ||||
return (FILTER_HANDLED); | return (FILTER_STRAY); | ||||
DBG_COUNTER_INC(fast_intrs); | DBG_COUNTER_INC(fast_intrs); | ||||
if (info->ifi_filter != NULL && info->ifi_filter(info->ifi_filter_arg) == FILTER_HANDLED) | if (info->ifi_filter != NULL | ||||
return (FILTER_HANDLED); | && (result = info->ifi_filter(info->ifi_filter_arg)) != FILTER_SCHEDULE_THREAD) | ||||
return result; | |||||
GROUPTASK_ENQUEUE(gtask); | GROUPTASK_ENQUEUE(gtask); | ||||
return (FILTER_HANDLED); | return (FILTER_SCHEDULE_THREAD); | ||||
} | } | ||||
static int | static int | ||||
_iflib_irq_alloc(if_ctx_t ctx, if_irq_t irq, int rid, | _iflib_irq_alloc(if_ctx_t ctx, if_irq_t irq, int rid, | ||||
driver_filter_t filter, driver_intr_t handler, void *arg, | driver_filter_t filter, driver_intr_t handler, void *arg, | ||||
const char *name) | const char *name) | ||||
{ | { | ||||
int rc, flags; | int rc, flags; | ||||
▲ Show 20 Lines • Show All 4,988 Lines • Show Last 20 Lines |
"Values in return statements should be enclosed in parentheses" according to style(9),
same for other occurrences of "return result".
Apart from that this patch looks good now, thanks.