Lines Matching refs:ib_spec
1339 union ib_flow_spec *ib_spec, in parse_flow_attr() argument
1344 switch (ib_spec->type) { in parse_flow_attr()
1346 if (FIELDS_NOT_SUPPORTED(ib_spec->eth.mask, LAST_ETH_FIELD)) in parse_flow_attr()
1350 memcpy(mlx4_spec->eth.dst_mac, ib_spec->eth.val.dst_mac, in parse_flow_attr()
1352 memcpy(mlx4_spec->eth.dst_mac_msk, ib_spec->eth.mask.dst_mac, in parse_flow_attr()
1354 mlx4_spec->eth.vlan_tag = ib_spec->eth.val.vlan_tag; in parse_flow_attr()
1355 mlx4_spec->eth.vlan_tag_msk = ib_spec->eth.mask.vlan_tag; in parse_flow_attr()
1358 if (FIELDS_NOT_SUPPORTED(ib_spec->ib.mask, LAST_IB_FIELD)) in parse_flow_attr()
1370 if (FIELDS_NOT_SUPPORTED(ib_spec->ipv4.mask, LAST_IPV4_FIELD)) in parse_flow_attr()
1374 mlx4_spec->ipv4.src_ip = ib_spec->ipv4.val.src_ip; in parse_flow_attr()
1375 mlx4_spec->ipv4.src_ip_msk = ib_spec->ipv4.mask.src_ip; in parse_flow_attr()
1376 mlx4_spec->ipv4.dst_ip = ib_spec->ipv4.val.dst_ip; in parse_flow_attr()
1377 mlx4_spec->ipv4.dst_ip_msk = ib_spec->ipv4.mask.dst_ip; in parse_flow_attr()
1382 if (FIELDS_NOT_SUPPORTED(ib_spec->tcp_udp.mask, LAST_TCP_UDP_FIELD)) in parse_flow_attr()
1385 type = ib_spec->type == IB_FLOW_SPEC_TCP ? in parse_flow_attr()
1388 mlx4_spec->tcp_udp.dst_port = ib_spec->tcp_udp.val.dst_port; in parse_flow_attr()
1389 mlx4_spec->tcp_udp.dst_port_msk = ib_spec->tcp_udp.mask.dst_port; in parse_flow_attr()
1390 mlx4_spec->tcp_udp.src_port = ib_spec->tcp_udp.val.src_port; in parse_flow_attr()
1391 mlx4_spec->tcp_udp.src_port_msk = ib_spec->tcp_udp.mask.src_port; in parse_flow_attr()
1484 union ib_flow_spec ib_spec; in __mlx4_ib_create_default_rules() local
1490 ib_spec.type = IB_FLOW_SPEC_IB; in __mlx4_ib_create_default_rules()
1491 ib_spec.size = sizeof(struct ib_flow_spec_ib); in __mlx4_ib_create_default_rules()
1499 ret = parse_flow_attr(mdev->dev, 0, &ib_spec, in __mlx4_ib_create_default_rules()
1621 union ib_flow_spec *ib_spec; in mlx4_ib_tunnel_steer_add() local
1630 ib_spec = (union ib_flow_spec *)ib_flow; in mlx4_ib_tunnel_steer_add()
1632 if (ib_spec->type != IB_FLOW_SPEC_ETH || flow_attr->num_of_specs != 1) in mlx4_ib_tunnel_steer_add()
1635 err = mlx4_tunnel_steer_add(to_mdev(qp->device)->dev, ib_spec->eth.val.dst_mac, in mlx4_ib_tunnel_steer_add()
1658 union ib_flow_spec *ib_spec; in mlx4_ib_add_dont_trap_rule() local
1660 ib_spec = (union ib_flow_spec *)(flow_attr + 1); in mlx4_ib_add_dont_trap_rule()
1661 if (ib_spec->type != IB_FLOW_SPEC_ETH) in mlx4_ib_add_dont_trap_rule()
1665 if (is_zero_ether_addr(ib_spec->eth.mask.dst_mac)) { in mlx4_ib_add_dont_trap_rule()
1669 u8 mac[ETH_ALEN] = {ib_spec->eth.mask.dst_mac[0] ^ 0x01, in mlx4_ib_add_dont_trap_rule()
1670 ib_spec->eth.mask.dst_mac[1], in mlx4_ib_add_dont_trap_rule()
1671 ib_spec->eth.mask.dst_mac[2], in mlx4_ib_add_dont_trap_rule()
1672 ib_spec->eth.mask.dst_mac[3], in mlx4_ib_add_dont_trap_rule()
1673 ib_spec->eth.mask.dst_mac[4], in mlx4_ib_add_dont_trap_rule()
1674 ib_spec->eth.mask.dst_mac[5]}; in mlx4_ib_add_dont_trap_rule()
1682 if (is_multicast_ether_addr(ib_spec->eth.val.dst_mac)) in mlx4_ib_add_dont_trap_rule()
2972 struct ib_flow_spec_ib *ib_spec; in mlx4_ib_steer_qp_reg() local
2983 ib_spec = (struct ib_flow_spec_ib *)(flow + 1); in mlx4_ib_steer_qp_reg()
2984 ib_spec->type = IB_FLOW_SPEC_IB; in mlx4_ib_steer_qp_reg()
2985 ib_spec->size = sizeof(struct ib_flow_spec_ib); in mlx4_ib_steer_qp_reg()
2987 memset(&ib_spec->mask, 0, sizeof(ib_spec->mask)); in mlx4_ib_steer_qp_reg()