Skip to content

Commit f2f9938

Browse files
Asbjørn Sloth Tønnesenkuba-moo
authored andcommitted
net: qede: use extack in qede_flow_parse_v4_common()
Convert qede_flow_parse_v4_common() to take extack, and drop the edev argument. Convert DP_NOTICE call to use NL_SET_ERR_MSG_MOD instead. Pass extack in calls to qede_flow_parse_ports() and qede_set_v4_tuple_to_profile(). In calls to qede_flow_parse_v4_common(), use NULL as extack for now, until a subsequent patch makes extack available. Only compile tested. Signed-off-by: Asbjørn Sloth Tønnesen <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent a62944d commit f2f9938

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

drivers/net/ethernet/qlogic/qede/qede_filter.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1757,8 +1757,9 @@ qede_flow_parse_v6_common(struct flow_rule *rule,
17571757
}
17581758

17591759
static int
1760-
qede_flow_parse_v4_common(struct qede_dev *edev, struct flow_rule *rule,
1761-
struct qede_arfs_tuple *t)
1760+
qede_flow_parse_v4_common(struct flow_rule *rule,
1761+
struct qede_arfs_tuple *t,
1762+
struct netlink_ext_ack *extack)
17621763
{
17631764
int err;
17641765

@@ -1768,19 +1769,20 @@ qede_flow_parse_v4_common(struct qede_dev *edev, struct flow_rule *rule,
17681769
flow_rule_match_ipv4_addrs(rule, &match);
17691770
if ((match.key->src && match.mask->src != htonl(U32_MAX)) ||
17701771
(match.key->dst && match.mask->dst != htonl(U32_MAX))) {
1771-
DP_NOTICE(edev, "Do not support ipv4 prefix/masks\n");
1772+
NL_SET_ERR_MSG_MOD(extack,
1773+
"Do not support ipv4 prefix/masks");
17721774
return -EINVAL;
17731775
}
17741776

17751777
t->src_ipv4 = match.key->src;
17761778
t->dst_ipv4 = match.key->dst;
17771779
}
17781780

1779-
err = qede_flow_parse_ports(rule, t, NULL);
1781+
err = qede_flow_parse_ports(rule, t, extack);
17801782
if (err)
17811783
return err;
17821784

1783-
return qede_set_v4_tuple_to_profile(t, NULL);
1785+
return qede_set_v4_tuple_to_profile(t, extack);
17841786
}
17851787

17861788
static int
@@ -1800,7 +1802,7 @@ qede_flow_parse_tcp_v4(struct qede_dev *edev, struct flow_rule *rule,
18001802
tuple->ip_proto = IPPROTO_TCP;
18011803
tuple->eth_proto = htons(ETH_P_IP);
18021804

1803-
return qede_flow_parse_v4_common(edev, rule, tuple);
1805+
return qede_flow_parse_v4_common(rule, tuple, NULL);
18041806
}
18051807

18061808
static int
@@ -1820,7 +1822,7 @@ qede_flow_parse_udp_v4(struct qede_dev *edev, struct flow_rule *rule,
18201822
tuple->ip_proto = IPPROTO_UDP;
18211823
tuple->eth_proto = htons(ETH_P_IP);
18221824

1823-
return qede_flow_parse_v4_common(edev, rule, tuple);
1825+
return qede_flow_parse_v4_common(rule, tuple, NULL);
18241826
}
18251827

18261828
static int

0 commit comments

Comments
 (0)