diff mbox series

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

Message ID 20240125214657.734291-5-mkp@redhat.com
State Changes Requested
Headers show
Series [ovs-dev,1/5] dp-packet: Reset offload/offsets when clearing a packet. | 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 fail test: fail
ovsrobot/github-robot-_Build_and_Test success github build: passed

Commit Message

Mike Pattrick Jan. 25, 2024, 9:46 p.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().

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);
     }