| 3600 | } |
| 3601 | |
| 3602 | int |
| 3603 | ixgbe_dev_rss_hash_update(struct rte_eth_dev *dev, |
| 3604 | struct rte_eth_rss_conf *rss_conf) |
| 3605 | { |
| 3606 | struct ixgbe_hw *hw; |
| 3607 | uint64_t rss_hf; |
| 3608 | |
| 3609 | hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); |
| 3610 | |
| 3611 | if (!ixgbe_rss_update_sp(hw->mac.type)) { |
| 3612 | PMD_DRV_LOG(ERR, "RSS hash update is not supported on this " |
| 3613 | "NIC."); |
| 3614 | return -ENOTSUP; |
| 3615 | } |
| 3616 | |
| 3617 | /* |
| 3618 | * Excerpt from section 7.1.2.8 Receive-Side Scaling (RSS): |
| 3619 | * "RSS enabling cannot be done dynamically while it must be |
| 3620 | * preceded by a software reset" |
| 3621 | * Before changing anything, first check that the update RSS operation |
| 3622 | * does not attempt to disable RSS, if RSS was enabled at |
| 3623 | * initialization time, or does not attempt to enable RSS, if RSS was |
| 3624 | * disabled at initialization time. |
| 3625 | */ |
| 3626 | rss_hf = rss_conf->rss_hf & IXGBE_RSS_OFFLOAD_ALL; |
| 3627 | if (!ixgbe_rss_enabled(hw)) { /* RSS disabled */ |
| 3628 | if (rss_hf != 0) /* Enable RSS */ |
| 3629 | return -(EINVAL); |
| 3630 | return 0; /* Nothing to do */ |
| 3631 | } |
| 3632 | /* RSS enabled */ |
| 3633 | if (rss_hf == 0) /* Disable RSS */ |
| 3634 | return -(EINVAL); |
| 3635 | ixgbe_hw_rss_hash_set(hw, rss_conf); |
| 3636 | return 0; |
| 3637 | } |
| 3638 | |
| 3639 | int |
| 3640 | ixgbe_dev_rss_hash_conf_get(struct rte_eth_dev *dev, |
nothing calls this directly
no test coverage detected