Live data from Hacker News

OpenBSD: PF queues break the 4 Gbps barrier

undeadly.org

71–74 of 74 posts

Re: OpenBSD: PF queues break the 4 Gbps barrier

#71

Earlier quoted context omitted.

[flagged]

At this level wouldnt a proper implementation be segregating the link into multiple VMs (or jails?) ? Or is that the same thing on BSD?

And how would you propose doing that? Note: what do you think the feature essentially does?

Re: OpenBSD: PF queues break the 4 Gbps barrier

#73
post #60
post #38

Earlier quoted context omitted.

I actually think this isn't even surprising from OpenBSD philosophically. They still subscribe to the Unix philosophy of old, moreso than FreeBSD and much much more than Linux. That is, "worse is better" and it's okay to accept a somewhat leaky abstraction or less helpful diagnostics if it simplifies the implementation. This is why `ed` doesn't bother to say anything but "?" to erroneous commands. If the user messes…

> That attitude may seem out of place today It absolutely doesn't. Everywhere I've worked we were instructed to give terse error messages to the user. Perhaps not a single "?", but "Oops, something went wrong!" is pretty widespread and equally unhelpful.

This is normal to return a terse message to a remote user via API. The remote user may be hostile, actively trying to gather information useful for breaking in.

But the local user who operates pf is already trusted, normally it would be root.

In either case, no error should be silently swallowed. Details should be logged in a secure way, else troubleshooting becomes orders of magnitude harder.

Re: OpenBSD: PF queues break the 4 Gbps barrier

#74
post #26
post #20

Earlier quoted context omitted.

The article is about allowing bandwidth restrictions in bytes/second that are larger than 2³²-1, not about how fast pf can filter packets. I guess few people with faster ports felt the need to limit bandwidth for a service to something that’s that large. FTA: “OpenBSD's PF packet filter has long supported HFSC traffic shaping with the queue rules in pf.conf(5). However, an internal 32-bit limitation in the HFSC servi…

> silently wrap around, producing incorrect and unpredictable Now I'm more scared to use OpenBSD than I was a minute before. I strongly prefer software that fails loudly and explicitly.

It’s a fairly common issue with C code, so you should be scared about more than OpenBSD. As an example:

  a_long = an_int * another_int;
will do the multiplication in integers, then convert the result to long. That can produce surprising results of the multiplication overflows (I think that, technically, that would be undefined behavior, allowing the compiler to do what it wants, but most compilers will generate a multiplication instruction and let the CPU do whatever it does with int overflow (wrap around and trapping are the most popular options)

Also,

  an_int = a_long;
is valid, and will do a narrowing conversion. I don’t think compilers are required to warn about that.
Post reply on HN