>> Isn't a symmetric hashing for af-packet something very fundamental? >> Looks much more like a bug to me. > > > I agree it would be useful resp. fundamental. I'm not quite sure whether > PACKET_FANOUT_HASH always had this guarantee since the initial > implementation
It is based on rxhash, which is intended to have this property. See for instance the commit messages from commit b249dcb82d32 ("rps: consistent rxhash") "In case we compute a software skb->rxhash, we can generate a consistent hash : Its value will be the same in both flow directions." commit 6862234238e8 ("net: small bug on rxhash calculation") also explicitly refers to this property. > f.e. depending on whether the skb got fanout demuxed from RX or TX paths, > you would either use a hw hash or it would have gone through the kernel's > (predecessor) flow dissector It's quite possible that not all hardware hash implementations do the right thing, indeed.