#endif /* DO_RFC_1812_CHECKS */
/*
- * We group consecutive packets with the same destionation port into one burst.
+ * We group consecutive packets with the same destination port into one burst.
* To avoid extra latency this is done together with some other packet
* processing, but after we made a final decision about packet's destination.
* To do this we maintain:
static const struct {
uint64_t pnum; /* prebuild 4 values for pnum[]. */
- int32_t idx; /* index for new last updated elemnet. */
+ int32_t idx; /* index for new last updated element. */
uint16_t lpv; /* add value to the last updated element. */
} gptbl[GRPSZ] = {
{
/* copy rest of the packets into the TX buffer. */
len = num - n;
+ if (len == 0)
+ goto exit;
+
j = 0;
switch (len % FWDSTEP) {
while (j < len) {
}
}
+exit:
qconf->tx_mbufs[port].len = len;
}