/* * precedence based dequeue with match function. Passing a NULL pointer * for the match function parameter is considered to be a wildcard so * any packet on the queue is returned. In that case it is no different * from brcmu_pktq_pdeq() above.
*/ struct sk_buff *brcmu_pktq_pdeq_match(struct pktq *pq, int prec, bool (*match_fn)(struct sk_buff *skb, void *arg), void *arg)
{ struct sk_buff_head *q; struct sk_buff *p, *next;
/* Return sum of lengths of a specific set of precedences */ int brcmu_pktq_mlen(struct pktq *pq, uint prec_bmp)
{ int prec, len;
len = 0;
for (prec = 0; prec <= pq->hi_prec; prec++) if (prec_bmp & (1 << prec))
len += pq->q[prec].skblist.qlen;
return len;
}
EXPORT_SYMBOL(brcmu_pktq_mlen);
/* Priority dequeue from a specific set of precedences */ struct sk_buff *brcmu_pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out)
{ struct sk_buff_head *q; struct sk_buff *p; int prec;
if (pktq_empty(pq)) return NULL;
while ((prec = pq->hi_prec) > 0 &&
skb_queue_empty(&pq->q[prec].skblist))
pq->hi_prec--;
while ((prec_bmp & (1 << prec)) == 0 ||
skb_queue_empty(&pq->q[prec].skblist)) if (prec-- == 0) return NULL;
q = &pq->q[prec].skblist;
p = skb_dequeue(q); if (p == NULL) return NULL;
pq->len--;
if (prec_out)
*prec_out = prec;
return p;
}
EXPORT_SYMBOL(brcmu_pktq_mdeq);
/* Produce a human-readable string for boardrev */ char *brcmu_boardrev_str(u32 brev, char *buf)
{ char c;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.