Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f752224 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'net-sched-summer-cleanup-part-1-mainly-in-exts-area'



Jiri Pirko says:

====================
net: sched: summer cleanup part 1, mainly in exts area

This patchset is one of the couple cleanup patchsets I have in queue.
The motivation aside the obvious need to "make things nicer" is also
to prepare for shared filter blocks introduction. That requires tp->q
removal, and therefore removal of all tp->q users.

Patch 1 is just some small thing I spotted on the way
Patch 2 removes one user of tp->q, namely tcf_em_tree_change
Patches 3-8 do preparations for exts->nr_actions removal
Patches 9-10 do simple renames of functions in cls*
Patches 11-19 remove unnecessary calls of tcf_exts_change helper
The last patch changes tcf_exts_change to don't take lock

Tested by tools/testing/selftests/tc-testing

v1->v2:
- removed conversion of action array to list as noted by Cong
- added the past patch instead
- small rebases of patches 11-19
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 967b2e2a 9b0d4446
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ static int fill_action_fields(struct adapter *adap,
	LIST_HEAD(actions);

	exts = cls->knode.exts;
	if (tc_no_actions(exts))
	if (!tcf_exts_has_actions(exts))
		return -EINVAL;

	tcf_exts_to_list(exts, &actions);
+1 −1
Original line number Diff line number Diff line
@@ -8953,7 +8953,7 @@ static int parse_tc_actions(struct ixgbe_adapter *adapter,
	LIST_HEAD(actions);
	int err;

	if (tc_no_actions(exts))
	if (!tcf_exts_has_actions(exts))
		return -EINVAL;

	tcf_exts_to_list(exts, &actions);
+2 −2
Original line number Diff line number Diff line
@@ -1326,7 +1326,7 @@ static int parse_tc_nic_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
	LIST_HEAD(actions);
	int err;

	if (tc_no_actions(exts))
	if (!tcf_exts_has_actions(exts))
		return -EINVAL;

	attr->flow_tag = MLX5_FS_DEFAULT_FLOW_TAG;
@@ -1839,7 +1839,7 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
	bool encap = false;
	int err = 0;

	if (tc_no_actions(exts))
	if (!tcf_exts_has_actions(exts))
		return -EINVAL;

	memset(attr, 0, sizeof(*attr));
+1 −1
Original line number Diff line number Diff line
@@ -1626,7 +1626,7 @@ static int mlxsw_sp_port_add_cls_matchall(struct mlxsw_sp_port *mlxsw_sp_port,
	LIST_HEAD(actions);
	int err;

	if (!tc_single_action(cls->exts)) {
	if (!tcf_exts_has_one_action(cls->exts)) {
		netdev_err(mlxsw_sp_port->dev, "only singular actions are supported\n");
		return -EOPNOTSUPP;
	}
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp,
	LIST_HEAD(actions);
	int err;

	if (tc_no_actions(exts))
	if (!tcf_exts_has_actions(exts))
		return 0;

	/* Count action is inserted first */
Loading