]> git.droids-corp.org - dpdk.git/blobdiff - examples/l3fwd/l3fwd_common.h
examples/l3fwd: add vector stubs for RISC-V
[dpdk.git] / examples / l3fwd / l3fwd_common.h
index cbaab79f5bf8f0bb2a7dc2c3e7e7b0981657dcf4..8e4c27218fef87d6154cd6538f686ab6bc18b0f8 100644 (file)
@@ -236,6 +236,9 @@ send_packetsx4(struct lcore_conf *qconf, uint16_t port, struct rte_mbuf *m[],
 
                /* 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) {
@@ -258,6 +261,7 @@ send_packetsx4(struct lcore_conf *qconf, uint16_t port, struct rte_mbuf *m[],
                }
        }
 
+exit:
        qconf->tx_mbufs[port].len = len;
 }