X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fmlx4%2Fmlx4.c;h=256aa3d66c8051b618f51828ada82f31e82c7198;hb=fee75e14f31cbd6c479e4fdbe367bdc640adbe01;hp=40c0ee29743529ff04cd900d858bfa3b31f6e6af;hpb=bdcad2f4843a02b7fcb5ec46b3bc1710f8b4d9f9;p=dpdk.git diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index 40c0ee2974..256aa3d66c 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -60,6 +60,7 @@ #include #include #include +#include #include #include #include @@ -97,13 +98,17 @@ static int mlx4_dev_configure(struct rte_eth_dev *dev) { struct priv *priv = dev->data->dev_private; + struct rte_flow_error error; int ret; /* Prepare internal flow rules. */ - ret = mlx4_flow_sync(priv); - if (ret) - ERROR("cannot set up internal flow rules: %s", - strerror(-ret)); + ret = mlx4_flow_sync(priv, &error); + if (ret) { + ERROR("cannot set up internal flow rules (code %d, \"%s\")," + " flow error type %d, cause %p, message: %s", + -ret, strerror(-ret), error.type, error.cause, + error.message ? error.message : "(unspecified)"); + } return ret; } @@ -122,6 +127,7 @@ static int mlx4_dev_start(struct rte_eth_dev *dev) { struct priv *priv = dev->data->dev_private; + struct rte_flow_error error; int ret; if (priv->started) @@ -134,10 +140,13 @@ mlx4_dev_start(struct rte_eth_dev *dev) (void *)dev); goto err; } - ret = mlx4_flow_start(priv); + ret = mlx4_flow_sync(priv, &error); if (ret) { - ERROR("%p: flow start failed: %s", - (void *)dev, strerror(ret)); + ERROR("%p: cannot attach flow rules (code %d, \"%s\")," + " flow error type %d, cause %p, message: %s", + (void *)dev, + -ret, strerror(-ret), error.type, error.cause, + error.message ? error.message : "(unspecified)"); goto err; } return 0; @@ -164,7 +173,7 @@ mlx4_dev_stop(struct rte_eth_dev *dev) return; DEBUG("%p: detaching flows from all RX queues", (void *)dev); priv->started = 0; - mlx4_flow_stop(priv); + mlx4_flow_sync(priv, NULL); mlx4_intr_uninstall(priv); }