MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mlx5_flow_ext_mreg_supported

Function mlx5_flow_ext_mreg_supported

dpdk/drivers/net/mlx5/mlx5_flow.c:1462–1476  ·  view source on GitHub ↗

* Check extensive flow metadata register support. * * @param dev * Pointer to rte_eth_dev structure. * * @return * True if device supports extensive flow metadata register, otherwise false. */

Source from the content-addressed store, hash-verified

1460 * True if device supports extensive flow metadata register, otherwise false.
1461 */
1462bool
1463mlx5_flow_ext_mreg_supported(struct rte_eth_dev *dev)
1464{
1465 struct mlx5_priv *priv = dev->data->dev_private;
1466
1467 /*
1468 * Having available reg_c can be regarded inclusively as supporting
1469 * extensive flow metadata register, which could mean,
1470 * - metadata register copy action by modify header.
1471 * - 16 modify header actions is supported.
1472 * - reg_c's are preserved across different domain (FDB and NIC) on
1473 * packet loopback by flow lookup miss.
1474 */
1475 return priv->sh->flow_mreg_c[2] != REG_NON;
1476}
1477
1478/**
1479 * Get the lowest priority.

Calls

no outgoing calls

Tested by

no test coverage detected