On Wed, May 13, 2015 at 5:21 AM, Jay Rolette <rolette at infiniteio.com> wrote:
> On Tue, May 12, 2015 at 8:16 PM, Ravi Kerur <rkerur at gmail.com> wrote: > >> On Mon, May 11, 2015 at 3:29 PM, Don Provan <dprovan at bivio.net> wrote: >> >> > I probably shouldn't stick my nose into this, but I can't help myself. >> > >> > An experienced programmer will tend to ignore the documentation for >> > a routine named "blahblah_memcmp" and just assume it functions like >> > memcmp. Whether or not there's currently a use case in DPDK is >> > completely irrelevant because as soon as there *is* a use case, some >> > poor DPDK developer will try to use rte_memcmp for that and may or >> > may not have a test case that reveals their mistake. >> > >> >> In general I agree with you. However, comparison is a hit(equal) or >> miss(unequal) is generally the case in networking. I haven't seen cases >> where "less than" or "greater than" has mattered. >> > > It's useful when you need to make sure packets from both sides of a > conversation go to the same processing queue/thread. Instead of hashing the > 5-tuple from the packet as src.ip, dst.ip, src.dport, dst.dport, etc., you > can use lesser.ip, higher.ip, lesser.sport, higher.dport, etc. > > Very common when you are doing deep packet inspection. > Thanks for sharing this information. > > Jay >