On 25 Jun 2024, at 22:51, Adrian Moreno wrote: > Although not explicitly documented in the psample module itself, the > definition of PSAMPLE_ATTR_SAMPLE_RATE seems inherited from act_sample. > > Quoting tc-sample(8): > "RATE of 100 will lead to an average of one sampled packet out of every > 100 observed." > > With this semantics, the rates that we can express with an unsigned > 32-bits number are very unevenly distributed and concentrated towards > "sampling few packets". > For example, we can express a probability of 2.32E-8% but we > cannot express anything between 100% and 50%. > > For sampling applications that are capable of sampling a decent > amount of packets, this sampling rate semantics is not very useful. > > Add a new flag to the uAPI that indicates that the sampling rate is > expressed in scaled probability, this is: > - 0 is 0% probability, no packets get sampled. > - U32_MAX is 100% probability, all packets get sampled. > > Signed-off-by: Adrian Moreno <amore...@redhat.com> Acked-by: Eelco Chaudron <echau...@redhat.com> _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
- Re: [ovs-dev] [PATCH net-next v5 02/10] net: sched... Adrián Moreno
- Re: [ovs-dev] [PATCH net-next v5 02/10] net: s... Eelco Chaudron
- [ovs-dev] [PATCH net-next v5 01/10] net: psample: add user ... Adrian Moreno
- Re: [ovs-dev] [PATCH net-next v5 01/10] net: psample: ... Ido Schimmel
- Re: [ovs-dev] [PATCH net-next v5 01/10] net: psample: ... Eelco Chaudron
- [ovs-dev] [PATCH net-next v5 03/10] net: psample: skip pack... Adrian Moreno
- Re: [ovs-dev] [PATCH net-next v5 03/10] net: psample: ... Ido Schimmel
- Re: [ovs-dev] [PATCH net-next v5 03/10] net: psample: ... Eelco Chaudron
- [ovs-dev] [PATCH net-next v5 04/10] net: psample: allow usi... Adrian Moreno
- Re: [ovs-dev] [PATCH net-next v5 04/10] net: psample: ... Ido Schimmel
- Re: [ovs-dev] [PATCH net-next v5 04/10] net: psample: ... Eelco Chaudron
- [ovs-dev] [PATCH net-next v5 05/10] net: openvswitch: add e... Adrian Moreno
- Re: [ovs-dev] [PATCH net-next v5 05/10] net: openvswit... Ilya Maximets
- Re: [ovs-dev] [PATCH net-next v5 05/10] net: openv... Adrián Moreno
- Re: [ovs-dev] [PATCH net-next v5 05/10] net: o... Ilya Maximets
- Re: [ovs-dev] [PATCH net-next v5 05/10] net: openvswit... Eelco Chaudron
- Re: [ovs-dev] [PATCH net-next v5 05/10] net: openv... Adrián Moreno
- Re: [ovs-dev] [PATCH net-next v5 05/10] net: o... Eelco Chaudron
- Re: [ovs-dev] [PATCH net-next v5 05/10] ne... Adrián Moreno
- Re: [ovs-dev] [PATCH net-next v5 05/1... Ilya Maximets
- Re: [ovs-dev] [PATCH net-next v5 ... Eelco Chaudron