The size of each entry in the port's rss table is actually 2 bytes
and not 1 byte. A segfault occurs when accessing part of port 0's rss
table because it gets overwritten by subsequent port 1's part of the
rss table. Fix by setting the size of each entry appropriately.
Fixes:
92c8a63223e5 ("cxgbe: add device configuration and Rx support")
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Fixed issue in ethdev library that the structure for setting
fdir's mask and flow entry was not consistent in byte ordering.
+* **cxgbe: Fixed crash due to incorrect size allocated for RSS table.**
+
+ Fixed a segfault that occurs when accessing part of port 0's RSS
+ table that gets overwritten by subsequent port 1's part of the RSS
+ table due to incorrect size allocated for each entry in the table.
+
* **aesni_mb: Fixed wrong return value when creating a device.**
cryptodev_aesni_mb_init() was returning the device id of the device created,
for_each_port(adap, i) {
struct port_info *pi = adap2pinfo(adap, i);
- pi->rss = rte_zmalloc(NULL, pi->rss_size, 0);
+ pi->rss = rte_zmalloc(NULL, pi->rss_size * sizeof(u16), 0);
if (!pi->rss)
return -ENOMEM;
}