X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fmlx4%2Fmlx4_flow.c;h=f4df4ab1fb59342296c1e541360daf7cd7d32592;hb=a1cdb4f884730204b89feec394de801badf47847;hp=3abde3093871d76d66bc91386229b73e73263c31;hpb=105add6bc30e3a060c0e37decb734121af0673aa;p=dpdk.git diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c index 3abde30938..f4df4ab1fb 100644 --- a/drivers/net/mlx4/mlx4_flow.c +++ b/drivers/net/mlx4/mlx4_flow.c @@ -71,7 +71,7 @@ struct mlx4_flow_proc_item { struct mlx4_drop { struct ibv_qp *qp; /**< QP target. */ struct ibv_cq *cq; /**< CQ associated with above QP. */ - struct priv *priv; /**< Back pointer to private data. */ + struct mlx4_priv *priv; /**< Back pointer to private data. */ uint32_t refcnt; /**< Reference count. */ }; @@ -95,7 +95,7 @@ struct mlx4_drop { * rte_errno is set. */ uint64_t -mlx4_conv_rss_types(struct priv *priv, uint64_t types, int verbs_to_dpdk) +mlx4_conv_rss_types(struct mlx4_priv *priv, uint64_t types, int verbs_to_dpdk) { enum { INNER, @@ -250,6 +250,7 @@ mlx4_flow_merge_eth(struct rte_flow *flow, if (!mask) { eth->val.dst_mac[0] = 0xff; flow->ibv_attr->type = IBV_FLOW_ATTR_ALL_DEFAULT; + flow->promisc = 1; return 0; } memcpy(eth->val.dst_mac, spec->dst.addr_bytes, ETHER_ADDR_LEN); @@ -662,7 +663,7 @@ static const struct mlx4_flow_proc_item mlx4_flow_proc_item_list[] = { * 0 on success, a negative errno value otherwise and rte_errno is set. */ static int -mlx4_flow_prepare(struct priv *priv, +mlx4_flow_prepare(struct mlx4_priv *priv, const struct rte_flow_attr *attr, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], @@ -933,7 +934,7 @@ mlx4_flow_validate(struct rte_eth_dev *dev, const struct rte_flow_action actions[], struct rte_flow_error *error) { - struct priv *priv = dev->data->dev_private; + struct mlx4_priv *priv = dev->data->dev_private; return mlx4_flow_prepare(priv, attr, pattern, actions, error, NULL); } @@ -949,7 +950,7 @@ mlx4_flow_validate(struct rte_eth_dev *dev, * is set. */ static struct mlx4_drop * -mlx4_drop_get(struct priv *priv) +mlx4_drop_get(struct mlx4_priv *priv) { struct mlx4_drop *drop = priv->drop; @@ -1025,7 +1026,7 @@ mlx4_drop_put(struct mlx4_drop *drop) * 0 on success, a negative errno value otherwise and rte_errno is set. */ static int -mlx4_flow_toggle(struct priv *priv, +mlx4_flow_toggle(struct mlx4_priv *priv, struct rte_flow *flow, int enable, struct rte_flow_error *error) @@ -1141,7 +1142,7 @@ mlx4_flow_create(struct rte_eth_dev *dev, const struct rte_flow_action actions[], struct rte_flow_error *error) { - struct priv *priv = dev->data->dev_private; + struct mlx4_priv *priv = dev->data->dev_private; struct rte_flow *flow; int err; @@ -1182,7 +1183,7 @@ mlx4_flow_isolate(struct rte_eth_dev *dev, int enable, struct rte_flow_error *error) { - struct priv *priv = dev->data->dev_private; + struct mlx4_priv *priv = dev->data->dev_private; if (!!enable == !!priv->isolated) return 0; @@ -1205,7 +1206,7 @@ mlx4_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow, struct rte_flow_error *error) { - struct priv *priv = dev->data->dev_private; + struct mlx4_priv *priv = dev->data->dev_private; int err = mlx4_flow_toggle(priv, flow, 0, error); if (err) @@ -1229,7 +1230,7 @@ static int mlx4_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error) { - struct priv *priv = dev->data->dev_private; + struct mlx4_priv *priv = dev->data->dev_private; struct rte_flow *flow = LIST_FIRST(&priv->flows); while (flow) { @@ -1254,7 +1255,7 @@ mlx4_flow_flush(struct rte_eth_dev *dev, * Next configured VLAN ID or a high value (>= 4096) if there is none. */ static uint16_t -mlx4_flow_internal_next_vlan(struct priv *priv, uint16_t vlan) +mlx4_flow_internal_next_vlan(struct mlx4_priv *priv, uint16_t vlan) { while (vlan < 4096) { if (priv->dev->data->vlan_filter_conf.ids[vlan / 64] & @@ -1294,7 +1295,7 @@ mlx4_flow_internal_next_vlan(struct priv *priv, uint16_t vlan) * 0 on success, a negative errno value otherwise and rte_errno is set. */ static int -mlx4_flow_internal(struct priv *priv, struct rte_flow_error *error) +mlx4_flow_internal(struct mlx4_priv *priv, struct rte_flow_error *error) { struct rte_flow_attr attr = { .priority = MLX4_FLOW_PRIORITY_LAST, @@ -1526,7 +1527,7 @@ error: * 0 on success, a negative errno value otherwise and rte_errno is set. */ int -mlx4_flow_sync(struct priv *priv, struct rte_flow_error *error) +mlx4_flow_sync(struct mlx4_priv *priv, struct rte_flow_error *error) { struct rte_flow *flow; int ret; @@ -1568,7 +1569,7 @@ mlx4_flow_sync(struct priv *priv, struct rte_flow_error *error) * Pointer to private structure. */ void -mlx4_flow_clean(struct priv *priv) +mlx4_flow_clean(struct mlx4_priv *priv) { struct rte_flow *flow;