Re: [RFC net-next 0/6] psp: use virt cookie as Rx steering hint
Willem de Bruijn <[email protected]>
| Newsgroups | org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
Jakub Kicinski wrote: > Hi! > > This PoC series uses a field of the PSP header intended for tunnels > to auto-steer Rx traffic. Various attempts have been made at trying > to get Rx traffic to land close to the core where the application runs. > By default RSS picks the Rx queue based on the flow hash. > I'm not going to cover all previous solutions in detail but broadly > - we have RFS in SW which looks on which CPU Tx happens and backlogs > Rx packets there, it is quite efficient. aRFS is built on top > of RFS but tries to program flows into the NIC. Some NICs have > a "cache" and try to automatically remember the flow to queue > association. > > All those solutions are entirely local to the receiver. > Ideally we would want the solution to look something like > TCP timestamp option - we send an opaque cookie to the peer, > and the peer echoes it back to us. Our NIC can steer based > on that echoed cookie. Another option is to reverse RSS entropy. This requires knowledge of the RSS secret. Especially with PSP, the outer UDP source port is defined as flow hash, so can be used for this. Have the receiver compute a 4-tuple hash such that it knows the RSS block will select the intended queue. The only free variable here in general is the source port. Then communicate this preferred source port to the sender. > This patch set implements exactly that using the optional PSP > Virtualization Cookie field. The PSP standard doesn't have much > to say about this field: > > Virtualization Cookie - 64b > An optional field, present if and only if V is set. > It may contain a Virtual Network Identifier (VNI) or other data, > as defined by the implementation. If using the PSP option space, no need to (ab)use the VC: "When the Hdr Ext Len is greater than 1, a Virtualization Cookie and/or other header extension fields may be present. The presence of a Virtualization Cookie is determined by the state of the V bit. For example, given Hdr Ext Len of 3, when V bit is set, there is an 8B VC after the IV, and another 8B extension header after the VC. The format of other header extension fields is determined by the applications and is opaque to the PSP hardware. " Right now all use besides VC is opaque to the device. For use-cases that should be interoperable across vendors, we should probably define a standard option space, with well defined options. In a manner that is cheap to parse at high rate, so no arbitrary order variable length headers.