|
@@ -1198,9 +1198,11 @@ ice_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring)
|
|
ring->tx_max_pending = ICE_MAX_NUM_DESC;
|
|
ring->tx_max_pending = ICE_MAX_NUM_DESC;
|
|
ring->rx_pending = vsi->rx_rings[0]->count;
|
|
ring->rx_pending = vsi->rx_rings[0]->count;
|
|
ring->tx_pending = vsi->tx_rings[0]->count;
|
|
ring->tx_pending = vsi->tx_rings[0]->count;
|
|
- ring->rx_mini_pending = ICE_MIN_NUM_DESC;
|
|
|
|
|
|
+
|
|
|
|
+ /* Rx mini and jumbo rings are not supported */
|
|
ring->rx_mini_max_pending = 0;
|
|
ring->rx_mini_max_pending = 0;
|
|
ring->rx_jumbo_max_pending = 0;
|
|
ring->rx_jumbo_max_pending = 0;
|
|
|
|
+ ring->rx_mini_pending = 0;
|
|
ring->rx_jumbo_pending = 0;
|
|
ring->rx_jumbo_pending = 0;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1218,14 +1220,23 @@ ice_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring)
|
|
ring->tx_pending < ICE_MIN_NUM_DESC ||
|
|
ring->tx_pending < ICE_MIN_NUM_DESC ||
|
|
ring->rx_pending > ICE_MAX_NUM_DESC ||
|
|
ring->rx_pending > ICE_MAX_NUM_DESC ||
|
|
ring->rx_pending < ICE_MIN_NUM_DESC) {
|
|
ring->rx_pending < ICE_MIN_NUM_DESC) {
|
|
- netdev_err(netdev, "Descriptors requested (Tx: %d / Rx: %d) out of range [%d-%d]\n",
|
|
|
|
|
|
+ netdev_err(netdev, "Descriptors requested (Tx: %d / Rx: %d) out of range [%d-%d] (increment %d)\n",
|
|
ring->tx_pending, ring->rx_pending,
|
|
ring->tx_pending, ring->rx_pending,
|
|
- ICE_MIN_NUM_DESC, ICE_MAX_NUM_DESC);
|
|
|
|
|
|
+ ICE_MIN_NUM_DESC, ICE_MAX_NUM_DESC,
|
|
|
|
+ ICE_REQ_DESC_MULTIPLE);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
new_tx_cnt = ALIGN(ring->tx_pending, ICE_REQ_DESC_MULTIPLE);
|
|
new_tx_cnt = ALIGN(ring->tx_pending, ICE_REQ_DESC_MULTIPLE);
|
|
|
|
+ if (new_tx_cnt != ring->tx_pending)
|
|
|
|
+ netdev_info(netdev,
|
|
|
|
+ "Requested Tx descriptor count rounded up to %d\n",
|
|
|
|
+ new_tx_cnt);
|
|
new_rx_cnt = ALIGN(ring->rx_pending, ICE_REQ_DESC_MULTIPLE);
|
|
new_rx_cnt = ALIGN(ring->rx_pending, ICE_REQ_DESC_MULTIPLE);
|
|
|
|
+ if (new_rx_cnt != ring->rx_pending)
|
|
|
|
+ netdev_info(netdev,
|
|
|
|
+ "Requested Rx descriptor count rounded up to %d\n",
|
|
|
|
+ new_rx_cnt);
|
|
|
|
|
|
/* if nothing to do return success */
|
|
/* if nothing to do return success */
|
|
if (new_tx_cnt == vsi->tx_rings[0]->count &&
|
|
if (new_tx_cnt == vsi->tx_rings[0]->count &&
|