git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/mlx5: refactor to detect operation by DevX
[dpdk.git]
/
drivers
/
net
/
mlx5
/
linux
/
mlx5_os.c
diff --git
a/drivers/net/mlx5/linux/mlx5_os.c
b/drivers/net/mlx5/linux/mlx5_os.c
index
7ee76d5
..
c1eda00
100644
(file)
--- a/
drivers/net/mlx5/linux/mlx5_os.c
+++ b/
drivers/net/mlx5/linux/mlx5_os.c
@@
-370,8
+370,7
@@
mlx5_os_capabilities_prepare(struct mlx5_dev_ctx_shared *sh)
sh->dev_cap.txpp_en = 0;
#endif
/* Check for LRO support. */
sh->dev_cap.txpp_en = 0;
#endif
/* Check for LRO support. */
- if (sh->dev_cap.dest_tir && sh->dev_cap.dv_flow_en &&
- hca_attr->lro_cap) {
+ if (mlx5_devx_obj_ops_en(sh) && hca_attr->lro_cap) {
/* TBD check tunnel lro caps. */
sh->dev_cap.lro_supported = 1;
DRV_LOG(DEBUG, "Device supports LRO.");
/* TBD check tunnel lro caps. */
sh->dev_cap.lro_supported = 1;
DRV_LOG(DEBUG, "Device supports LRO.");
@@
-1550,8
+1549,7
@@
err_secondary:
if (mlx5_flex_item_port_init(eth_dev) < 0)
goto error;
}
if (mlx5_flex_item_port_init(eth_dev) < 0)
goto error;
}
- if (sh->cdev->config.devx && sh->config.dv_flow_en &&
- sh->dev_cap.dest_tir) {
+ if (mlx5_devx_obj_ops_en(sh)) {
priv->obj_ops = devx_obj_ops;
mlx5_queue_counter_id_prepare(eth_dev);
priv->obj_ops.lb_dummy_queue_create =
priv->obj_ops = devx_obj_ops;
mlx5_queue_counter_id_prepare(eth_dev);
priv->obj_ops.lb_dummy_queue_create =