Caught by code review, this copy is unnecessary.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
count = 0;
goto out;
}
+ /*
+ * Inject it to the head of "pkts" array, so that switch's mac
+ * learning table will get updated first.
+ */
+ pkts[0] = rarp_mbuf;
+ pkts++;
count -= 1;
}
out_access_unlock:
rte_spinlock_unlock(&vq->access_lock);
- if (unlikely(rarp_mbuf != NULL)) {
- /*
- * Inject it to the head of "pkts" array, so that switch's mac
- * learning table will get updated first.
- */
- memmove(&pkts[1], pkts, count * sizeof(struct rte_mbuf *));
- pkts[0] = rarp_mbuf;
+ if (unlikely(rarp_mbuf != NULL))
count += 1;
- }
return count;
}