qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 4/4] net/colo: Match is-enabled probe to tracepoint


From: Roman Bolshakov
Subject: Re: [PATCH v2 4/4] net/colo: Match is-enabled probe to tracepoint
Date: Mon, 20 Jul 2020 13:59:06 +0300

On Sat, Jul 18, 2020 at 05:58:56PM +0000, Zhang, Chen wrote:
> > -----Original Message-----
> > From: Roman Bolshakov <r.bolshakov@yadro.com>
> > Sent: Friday, July 17, 2020 5:35 PM
> > @@ -533,12 +535,12 @@ static int colo_packet_compare_udp(Packet *spkt,
> > Packet *ppkt)
> >                                      ppkt->size - offset)) {
> >          trace_colo_compare_udp_miscompare("primary pkt size", ppkt->size);
> >          trace_colo_compare_udp_miscompare("Secondary pkt size", spkt-
> > >size);
> > -        if
> > (trace_event_get_state_backends(TRACE_COLO_COMPARE_MISCOMPARE))
> > {
> > -            qemu_hexdump((char *)ppkt->data, stderr, "colo-compare pri 
> > pkt",
> > -                         ppkt->size);
> > -            qemu_hexdump((char *)spkt->data, stderr, "colo-compare sec 
> > pkt",
> > -                         spkt->size);
> > -        }
> > +#ifdef DEBUG_COLO_PACKETS
> > +        qemu_hexdump((char *)ppkt->data, stderr, "colo-compare pri pkt",
> > +                     ppkt->size);
> > +        qemu_hexdump((char *)spkt->data, stderr, "colo-compare sec pkt",
> > +                     spkt->size);
> > +#endif
> 
> I think change the " trace_event_get_state_backends()" to 
> "trace_colo_compare_main("Dump packet hex: ")" is a better choice here.
> It will keep the original code logic and avoid the problem here.
> 

Hi Chen,

Do you mean to use another is-enabled probe?
e.g. change from
"if (trace_event_get_state_backends(TRACE_COLO_COMPARE_MISCOMPARE))"
to
"if (trace_event_get_state_backends(TRACE_COLO_COMPARE_MAIN))"

Thanks,
Roman



reply via email to

[Prev in Thread] Current Thread [Next in Thread]