diff mbox series

[ovs-dev,v4,4/4] ofproto-dpif-monitor: Remove unneeded calls to clear packets.

Message ID 20240212065021.154653-4-mkp@redhat.com
State Accepted
Commit 0061a48920bcf28204670627c45cb66a1da44ae6
Headers show
Series [ovs-dev,v4,1/4] dp-packet: Validate correct offset for L4 inner size. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/intel-ovs-compilation success test: success

Commit Message

Mike Pattrick Feb. 12, 2024, 6:50 a.m. UTC
Currently the monitor will call dp_packet_clear() on the dp_packet that
is shared amongst BFD, LLDP, and CFM. However, all of these packets are
created with eth_compose(), which already calls dp_packet_clear().

Reviewed-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Mike Pattrick <mkp@redhat.com>
---
 ofproto/ofproto-dpif-monitor.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

diff --git a/ofproto/ofproto-dpif-monitor.c b/ofproto/ofproto-dpif-monitor.c
index bb0e49091..5132f9c95 100644
--- a/ofproto/ofproto-dpif-monitor.c
+++ b/ofproto/ofproto-dpif-monitor.c
@@ -275,19 +275,16 @@  monitor_mport_run(struct mport *mport, struct dp_packet *packet)
     long long int lldp_wake_time = LLONG_MAX;
 
     if (mport->cfm && cfm_should_send_ccm(mport->cfm)) {
-        dp_packet_clear(packet);
         cfm_compose_ccm(mport->cfm, packet, mport->hw_addr);
         ofproto_dpif_send_packet(mport->ofport, false, packet);
     }
     if (mport->bfd && bfd_should_send_packet(mport->bfd)) {
         bool oam;
 
-        dp_packet_clear(packet);
         bfd_put_packet(mport->bfd, packet, mport->hw_addr, &oam);
         ofproto_dpif_send_packet(mport->ofport, oam, packet);
     }
     if (mport->lldp && lldp_should_send_packet(mport->lldp)) {
-        dp_packet_clear(packet);
         lldp_put_packet(mport->lldp, packet, mport->hw_addr);
         ofproto_dpif_send_packet(mport->ofport, false, packet);
     }