2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-22 18:07:40 +00:00

ipf: Cancel fragment pkt copy.

Canceling packet copying can better improve the performance of handling
fragmented packets. In 640d4db, pkt copying was added to fix the crash,
but the crash has been fixed in 7e6b41a, so there is no need to copy the
pkt any longer.

Acked-by: Mike Pattrick <mkp@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: fang <fangjiannan@cmss.chinamobile.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>
This commit is contained in:
fang 2024-12-13 17:06:58 +08:00 committed by Aaron Conole
parent 638433bb92
commit e929e2c20d
2 changed files with 2 additions and 2 deletions

View File

@ -171,6 +171,7 @@ Ethan Rahn erahn@arista.com
Eziz Durdyyev ezizdurdy@gmail.com Eziz Durdyyev ezizdurdy@gmail.com
Fabrizio D'Angelo fdangelo@redhat.com Fabrizio D'Angelo fdangelo@redhat.com
Faicker Mo faicker.mo@ucloud.cn Faicker Mo faicker.mo@ucloud.cn
fang fangjiannan@cmss.chinamobile.com
Fangrui Song maskray@google.com Fangrui Song maskray@google.com
Felix Huettner felix.huettner@mail.schwarz Felix Huettner felix.huettner@mail.schwarz
Fengqi Li lifengqi@inspur.com Fengqi Li lifengqi@inspur.com

View File

@ -820,7 +820,7 @@ ipf_process_frag(struct ipf *ipf, struct ipf_list *ipf_list,
* recommend not setting the mempool number of buffers too low * recommend not setting the mempool number of buffers too low
* and also clamp the number of fragments. */ * and also clamp the number of fragments. */
struct ipf_frag *frag = &ipf_list->frag_list[last_inuse_idx + 1]; struct ipf_frag *frag = &ipf_list->frag_list[last_inuse_idx + 1];
frag->pkt = dp_packet_clone(pkt); frag->pkt = pkt;
frag->start_data_byte = start_data_byte; frag->start_data_byte = start_data_byte;
frag->end_data_byte = end_data_byte; frag->end_data_byte = end_data_byte;
ipf_list->last_inuse_idx++; ipf_list->last_inuse_idx++;
@ -959,7 +959,6 @@ ipf_extract_frags_from_batch(struct ipf *ipf, struct dp_packet_batch *pb,
dp_packet_batch_refill(pb, rp->pkt, pb_idx); dp_packet_batch_refill(pb, rp->pkt, pb_idx);
rp->list->reass_execute_ctx = rp->pkt; rp->list->reass_execute_ctx = rp->pkt;
} }
dp_packet_delete(pkt);
} }
ovs_mutex_unlock(&ipf->ipf_lock); ovs_mutex_unlock(&ipf->ipf_lock);
} else { } else {