|
@@ -1562,6 +1562,11 @@ static int mlx4_en_flow_replace(struct net_device *dev,
|
|
|
qpn = priv->drop_qp.qpn;
|
|
|
else if (cmd->fs.ring_cookie & EN_ETHTOOL_QP_ATTACH) {
|
|
|
qpn = cmd->fs.ring_cookie & (EN_ETHTOOL_QP_ATTACH - 1);
|
|
|
+ if (qpn < priv->rss_map.base_qpn ||
|
|
|
+ qpn >= priv->rss_map.base_qpn + priv->rx_ring_num) {
|
|
|
+ en_warn(priv, "rxnfc: QP (0x%x) doesn't exist\n", qpn);
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
} else {
|
|
|
if (cmd->fs.ring_cookie >= priv->rx_ring_num) {
|
|
|
en_warn(priv, "rxnfc: RX ring (%llu) doesn't exist\n",
|