diff options
author | Thomas Falcon <tlfalcon@linux.vnet.ibm.com> | 2018-07-13 13:03:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-16 17:00:39 -0400 |
commit | 2d14d3795294d42aacc278948984a480569bcc23 (patch) | |
tree | 5882cca24ead12ab41a2971de65e880d8623e02e | |
parent | e66515999b627368892ccc9b3a13a506f2ea1357 (diff) |
ibmvnic: Revise RX/TX queue error messages
During a device failover, there may be latency between the loss
of the current backing device and a notification from firmware that
a failover has occurred. This latency can result in a large amount of
error printouts as firmware returns outgoing traffic with a generic
error code. These are not necessarily errors in this case as the
firmware is busy swapping in a new backing adapter and is not ready
to send packets yet. This patch reclassifies those error codes as
warnings with an explanation that a failover may be pending. All
other return codes will be considered errors.
Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/ibm/ibmvnic.c | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index d0e196bff081..c50963680f30 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c | |||
@@ -329,7 +329,8 @@ static void replenish_rx_pool(struct ibmvnic_adapter *adapter, | |||
329 | return; | 329 | return; |
330 | 330 | ||
331 | failure: | 331 | failure: |
332 | dev_info(dev, "replenish pools failure\n"); | 332 | if (lpar_rc != H_PARAMETER && lpar_rc != H_CLOSED) |
333 | dev_err_ratelimited(dev, "rx: replenish packet buffer failed\n"); | ||
333 | pool->free_map[pool->next_free] = index; | 334 | pool->free_map[pool->next_free] = index; |
334 | pool->rx_buff[index].skb = NULL; | 335 | pool->rx_buff[index].skb = NULL; |
335 | 336 | ||
@@ -1617,7 +1618,8 @@ static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
1617 | &tx_crq); | 1618 | &tx_crq); |
1618 | } | 1619 | } |
1619 | if (lpar_rc != H_SUCCESS) { | 1620 | if (lpar_rc != H_SUCCESS) { |
1620 | dev_err(dev, "tx failed with code %ld\n", lpar_rc); | 1621 | if (lpar_rc != H_CLOSED && lpar_rc != H_PARAMETER) |
1622 | dev_err_ratelimited(dev, "tx: send failed\n"); | ||
1621 | dev_kfree_skb_any(skb); | 1623 | dev_kfree_skb_any(skb); |
1622 | tx_buff->skb = NULL; | 1624 | tx_buff->skb = NULL; |
1623 | 1625 | ||
@@ -3204,6 +3206,25 @@ static union ibmvnic_crq *ibmvnic_next_crq(struct ibmvnic_adapter *adapter) | |||
3204 | return crq; | 3206 | return crq; |
3205 | } | 3207 | } |
3206 | 3208 | ||
3209 | static void print_subcrq_error(struct device *dev, int rc, const char *func) | ||
3210 | { | ||
3211 | switch (rc) { | ||
3212 | case H_PARAMETER: | ||
3213 | dev_warn_ratelimited(dev, | ||
3214 | "%s failed: Send request is malformed or adapter failover pending. (rc=%d)\n", | ||
3215 | func, rc); | ||
3216 | break; | ||
3217 | case H_CLOSED: | ||
3218 | dev_warn_ratelimited(dev, | ||
3219 | "%s failed: Backing queue closed. Adapter is down or failover pending. (rc=%d)\n", | ||
3220 | func, rc); | ||
3221 | break; | ||
3222 | default: | ||
3223 | dev_err_ratelimited(dev, "%s failed: (rc=%d)\n", func, rc); | ||
3224 | break; | ||
3225 | } | ||
3226 | } | ||
3227 | |||
3207 | static int send_subcrq(struct ibmvnic_adapter *adapter, u64 remote_handle, | 3228 | static int send_subcrq(struct ibmvnic_adapter *adapter, u64 remote_handle, |
3208 | union sub_crq *sub_crq) | 3229 | union sub_crq *sub_crq) |
3209 | { | 3230 | { |
@@ -3230,11 +3251,8 @@ static int send_subcrq(struct ibmvnic_adapter *adapter, u64 remote_handle, | |||
3230 | cpu_to_be64(u64_crq[2]), | 3251 | cpu_to_be64(u64_crq[2]), |
3231 | cpu_to_be64(u64_crq[3])); | 3252 | cpu_to_be64(u64_crq[3])); |
3232 | 3253 | ||
3233 | if (rc) { | 3254 | if (rc) |
3234 | if (rc == H_CLOSED) | 3255 | print_subcrq_error(dev, rc, __func__); |
3235 | dev_warn(dev, "CRQ Queue closed\n"); | ||
3236 | dev_err(dev, "Send error (rc=%d)\n", rc); | ||
3237 | } | ||
3238 | 3256 | ||
3239 | return rc; | 3257 | return rc; |
3240 | } | 3258 | } |
@@ -3252,11 +3270,8 @@ static int send_subcrq_indirect(struct ibmvnic_adapter *adapter, | |||
3252 | cpu_to_be64(remote_handle), | 3270 | cpu_to_be64(remote_handle), |
3253 | ioba, num_entries); | 3271 | ioba, num_entries); |
3254 | 3272 | ||
3255 | if (rc) { | 3273 | if (rc) |
3256 | if (rc == H_CLOSED) | 3274 | print_subcrq_error(dev, rc, __func__); |
3257 | dev_warn(dev, "CRQ Queue closed\n"); | ||
3258 | dev_err(dev, "Send (indirect) error (rc=%d)\n", rc); | ||
3259 | } | ||
3260 | 3275 | ||
3261 | return rc; | 3276 | return rc; |
3262 | } | 3277 | } |