Skip to content

Commit

Permalink
ipf: Cancel fragment pkt copy.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Aaron Conole <[email protected]>
Signed-off-by: fang <[email protected]>
Signed-off-by: Aaron Conole <[email protected]>
  • Loading branch information
fang authored and apconole committed Dec 20, 2024
1 parent 638433b commit e929e2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ Ethan Rahn [email protected]
Eziz Durdyyev [email protected]
Fabrizio D'Angelo [email protected]
Faicker Mo [email protected]
fang [email protected]
Fangrui Song [email protected]
Felix Huettner [email protected]
Fengqi Li [email protected]
Expand Down
3 changes: 1 addition & 2 deletions lib/ipf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* and also clamp the number of fragments. */
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->end_data_byte = end_data_byte;
ipf_list->last_inuse_idx++;
Expand Down Expand Up @@ -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);
rp->list->reass_execute_ctx = rp->pkt;
}
dp_packet_delete(pkt);
}
ovs_mutex_unlock(&ipf->ipf_lock);
} else {
Expand Down

0 comments on commit e929e2c

Please sign in to comment.