mirror of
https://github.com/openvswitch/ovs
synced 2025-09-05 16:55:42 +00:00
dpif-netdev: Reduce code duplication
Code clean up to reduce code duplication. Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
This commit is contained in:
@@ -3275,13 +3275,11 @@ dp_netdev_queue_batches(struct dp_packet *pkt,
|
||||
{
|
||||
struct packet_batch *batch = flow->batch;
|
||||
|
||||
if (OVS_LIKELY(batch)) {
|
||||
packet_batch_update(batch, pkt, mf);
|
||||
return;
|
||||
if (OVS_UNLIKELY(!batch)) {
|
||||
batch = &batches[(*n_batches)++];
|
||||
packet_batch_init(batch, flow);
|
||||
}
|
||||
|
||||
batch = &batches[(*n_batches)++];
|
||||
packet_batch_init(batch, flow);
|
||||
packet_batch_update(batch, pkt, mf);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user