if (!flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ENC_PORTS)) return -EOPNOTSUPP;
flow_rule_match_enc_ports(rule, &enc_ports);
/* check the UDP destination port validity */
if (!mlx5_vxlan_lookup_port(priv->mdev->vxlan,
be16_to_cpu(enc_ports.key->dst))) {
NL_SET_ERR_MSG_MOD(extack, "Matched UDP dst port is not registered as a VXLAN port");
netdev_warn(priv->netdev, "UDP port %d is not registered as a VXLAN port\n",
be16_to_cpu(enc_ports.key->dst)); return -EOPNOTSUPP;
}
if (!mlx5_vxlan_lookup_port(priv->mdev->vxlan, dst_port)) {
NL_SET_ERR_MSG_MOD(extack, "vxlan udp dport was not registered with the HW");
netdev_warn(priv->netdev, "%d isn't an offloaded vxlan udp dport\n",
dst_port); return -EOPNOTSUPP;
}
if (memchr_inv(&enc_opts.mask->data, 0, sizeof(enc_opts.mask->data)) &&
!MLX5_CAP_ESW_FT_FIELD_SUPPORT_2(priv->mdev, tunnel_header_0_1)) {
NL_SET_ERR_MSG_MOD(extack, "Matching on VxLAN GBP is not supported"); return -EOPNOTSUPP;
}
if (enc_opts.key->dst_opt_type != IP_TUNNEL_VXLAN_OPT_BIT) {
NL_SET_ERR_MSG_MOD(extack, "Wrong VxLAN option type: not GBP"); return -EOPNOTSUPP;
}
if (enc_opts.key->len != sizeof(*gbp) ||
enc_opts.mask->len != sizeof(*gbp_mask)) {
NL_SET_ERR_MSG_MOD(extack, "VxLAN GBP option/mask len is not 32 bits"); return -EINVAL;
}
if (!flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ENC_KEYID)) return 0;
flow_rule_match_enc_keyid(rule, &enc_keyid);
if (!enc_keyid.mask->keyid) return 0;
if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ENC_OPTS)) { int err;
err = mlx5e_tc_tun_parse_vxlan_gbp_option(priv, spec, f); if (err) return err;
/* We can't mix custom tunnel headers with symbolic ones and we * don't have a symbolic field name for GBP, so we use custom * tunnel headers in this case. We need hardware support to * match on custom tunnel headers, but we already know it's * supported because the previous call successfully checked for * that.
*/
misc_c = MLX5_ADDR_OF(fte_match_param, spec->match_criteria,
misc_parameters_5);
misc_v = MLX5_ADDR_OF(fte_match_param, spec->match_value,
misc_parameters_5);
/* Shift by 8 to account for the reserved bits in the vxlan * header after the VNI.
*/
MLX5_SET(fte_match_set_misc5, misc_c, tunnel_header_1,
be32_to_cpu(enc_keyid.mask->keyid) << 8);
MLX5_SET(fte_match_set_misc5, misc_v, tunnel_header_1,
be32_to_cpu(enc_keyid.key->keyid) << 8);
if (!MLX5_CAP_ESW_FLOWTABLE_FDB(priv->mdev,
ft_field_support.outer_vxlan_vni)) {
NL_SET_ERR_MSG_MOD(extack, "Matching on VXLAN VNI is not supported");
netdev_warn(priv->netdev, "Matching on VXLAN VNI is not supported\n"); return -EOPNOTSUPP;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.