I am approaching the lower-level networking world, made of linux kernel, mellanox drivers and DPDK libraries.
I have read some documentations around about those topics, trying to understand how to leverage the multiple rx/tx queues of my NIC for my purposes and, in case, also leverage the capabilities of the DPDK libraries.
Despite this, I have not properly grasped how these technologies can be used to fulfill my goal (or if it is even possible).
My goal is the following: I would like my application to be able to redirect incoming packets to a specific queue depending on information that are in the header, according to a function that I specify (not a built-in hash function).
In particular, I would like to steer a UDP packet depending on the content of the header and the entries of lookup table that the top-level application supplies (and can manipulate at runtime). This steering operation must be able to rely on a pointer to an application-defined function to identify the proper entry in the table.
Here are my questions
0) Is this possible in any way?
1) As far as I understood, this should be possible with a mlx4 driver (which I use), using RPS, but I have not properly understood how to use RPS. In addition, it is not clear to me whether RPS is compatible at all with the DPDK libraries.
2) In my understanding, RPS is "expensive" when compared to other techniques, like RSS or other hardware-assisted techniques. I think that I could implement what I want if I could hack the mlx4 driver and the linux kernel to force RSS to use my "hash function" (that is actually a lookup function). I could insert my lookup table, provide pointers to functions and also expose some hooks to the application to modify the header-to-queue mapping. Note that the hacking does not need to be "clean"; e.g., I could live even with having to recompile together app and driver etc.
Do you confirm this would be possible? If you do, would you provide me with some pointers to the linux kernel code and mlx4 driver code to start my hacking journey? I have scavenged the mlx4 driver code but I only found the functions to set the TOP vs XOR hash function, and I did not find the code portion to mess with to implement what I want to do. I did not find the proper networking linux kernel's code portions either
3) If what I wrote before is possible, then what would be the actual advantage of using the DPDK libraries? Or is it even possible to leverage them to implement what I want?
I am using DPDK 2.2
I have followed the instructions in  and installed MLNX_OFED_LINUX-3.1-1.0.3-ubuntu14.04-x86_64 (3.2 is out, but instructions in  refers to 3.1)
My NIC :
05:00.0 Ethernet controller: Mellanox Technologies MT27520 Family [ConnectX-3 Pro]
I have a single port and 2 NUMA domains
My machine runs a 3.19.0-47-generic on Ubuntu 14.04.
CPU is Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz 2x8 cores
Thank you for any help/pointer/resource/code snippet you will be able to give me.