upspec
attrs->upspec.dport = ntohs(sel->dport);
attrs->upspec.dport_mask = ntohs(sel->dport_mask);
attrs->upspec.sport = ntohs(sel->sport);
attrs->upspec.sport_mask = ntohs(sel->sport_mask);
attrs->upspec.proto = sel->proto;
attrs->upspec.dport = ntohs(x->sel.dport);
attrs->upspec.dport_mask = ntohs(x->sel.dport_mask);
attrs->upspec.sport = ntohs(x->sel.sport);
attrs->upspec.sport_mask = ntohs(x->sel.sport_mask);
attrs->upspec.proto = x->sel.proto;
struct upspec upspec;
struct upspec upspec;
static void setup_fte_upper_proto_match(struct mlx5_flow_spec *spec, struct upspec *upspec)
switch (upspec->proto) {
if (upspec->dport) {
udp_dport, upspec->dport_mask);
udp_dport, upspec->dport);
if (upspec->sport) {
udp_sport, upspec->sport_mask);
udp_sport, upspec->sport);
if (upspec->dport) {
tcp_dport, upspec->dport_mask);
tcp_dport, upspec->dport);
if (upspec->sport) {
tcp_sport, upspec->sport_mask);
tcp_sport, upspec->sport);
MLX5_SET(fte_match_set_lyr_2_4, spec->match_value, ip_protocol, upspec->proto);
struct upspec *upspec)
setup_fte_upper_proto_match(spec, upspec);
if (attrs->upspec.proto && attrs->type == XFRM_DEV_OFFLOAD_PACKET) {
err = rx_add_rule_sa_selector(sa_entry, rx, &attrs->upspec);
setup_fte_upper_proto_match(spec, &attrs->upspec);
setup_fte_upper_proto_match(spec, &attrs->upspec);
setup_fte_upper_proto_match(spec, &attrs->upspec);