Mario Rugiero

Results 187 comments of Mario Rugiero

Based on @fjorgemota suggested approach I made the draft PR #347. I still need to write tests and benchmarks, but there's an implementation to get the idea.

Added simple test and benchmarks: ``` $ go test -bench Checksum -run - goos: linux goarch: amd64 pkg: github.com/RoaringBitmap/roaring cpu: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz BenchmarkChecksum/checksum-1-8 1000000000 0.0000004 ns/op...

Interestingly, inverting the `||` yields the correct results. `tcpdump "(0 & 4294967295 = 0) && (1 / 4294967295 = 0) || (1 = 0)"` lets all packets pass.

I wonder if there's a more generic way to expose this, as many network stacks provide similar capabilities. Ones I definitely know of are DPDK and XDP (technically Linux, too,...

@tsnoam I see your point, but I think masking implementation details is more or less the point of using libpcap as an abstraction. I'm OK-ish with marking it as an...

> In any case, I feel that we do have an understanding that this PR is worthy of finding itself into upstream, with the open question of whether it should...

I think not, and the lack of activity during 5 months backs me up. Can it be closed?

`pcap_protocol` returns the link layer protocol you used to open the socket, and from what I've quickly read, it seems that's what `sockaddr_ll.sll_protocol` expects.

I assigned this to myself and plan to work on it during the following weekends. The plan is more or less as follows: 1. Write benchmarks to assess the current...

Very nice work! I left a few comments, and as @lemire mentioned we would need some benchmarks to measure the effects.