[ovs-dev] [PATCH] Genericize/simplify kernel sFlow implementation

Jesse Gross jesse at nicira.com
Tue Sep 13 17:27:45 UTC 2011


On Mon, Sep 12, 2011 at 4:37 PM, Jesse Gross <jesse at nicira.com> wrote:
> On Tue, Aug 30, 2011 at 6:59 PM, Pravin Shelar <pshelar at nicira.com> wrote:
>>         if (ofproto->sflow) {
>> +            dpif_get_dp_stats(ofproto->dpif, &s);
>>             odp_flow_key_to_flow(upcall->key, upcall->key_len, &flow);
>> -            dpif_sflow_received(ofproto->sflow, upcall, &flow);
>> +            dpif_sflow_received(ofproto->sflow, upcall, &flow,
>> +                                           (s.n_hit + s.n_missed));
>
> This will miss packets that are completely synthesized by the
> controller or userspace.

Looking at this again, this is really not the right value anyways.
Previously, the sample pool was the number of packets received on a
particular ingress port but this is reporting the number of packets
flowing through the datapath.



More information about the dev mailing list