DPDK中文-intel网卡的RSS

在搞DPDK的时候有个RSS设置,
RSS(Receive-Side Scaling)

网卡硬件实现的分队列的算法:

DPDK中文-intel网卡的RSS_第1张图片

报文进入网卡后通过rss hash算法,算出一个32bit的数,
LS的意思:参考 https://zhidao.baidu.com/question/155072477.html
LSB(Least Significant Bit),意为 最低有效位 ;MSB(Most Significant Bit),意 为最高有效位,若MSB=1,则表示数据为负值,若MSB=0,则表示数据为正。
然后取这个32bit数的7LSB。这个数的可能性就是2的7次方。。一共128种。。
用这个7LBS的数字带入RedriectionTable中可以得到一个4bit的数,这个RedriectionTable是可以配置的。得到的4bit数就是0-15。。。也就是82599的队列ID;

下面是Intel 82599手册提供的RSS 算法:
For hash-input input[] of length N bytes (8N bits) and a random secret key
K of 320 bits
Result = 0;
For each bit b in input[] {
if (b == 1) then Result ^= (left-most 32 bits of K);
shift K left 1 bit position;
}
return Result;

其中RSK是指定的RSS KEY
指的是

我们系统配置的是对称hash
参考文档
http://www.ran-lifshitz.com/2014/08/28/symmetric-rss-receive-side-scaling/


参考文档
http://www.xuebuyuan.com/877858.html
http://www.intel.com/content/www/us/en/embedded/products/networking/82599-10-gbe-controller-datasheet.html

你可能感兴趣的:(dpdk)