net/sched: act_mirred: Add helper function tcf_mirred_replace_dev
authorVictor Nogueira <victor@mojatatu.com>
Tue, 19 Dec 2023 18:16:22 +0000 (15:16 -0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Dec 2023 21:20:08 +0000 (21:20 +0000)
commit415e38bf1d8d789ee1fcb26bd815d8b95fe4faad
tree40d5f16bb17fc4c8aefd58d9811d12903c192717
parent16085e48cb48aeb50a1178dc276747749910b0f2
net/sched: act_mirred: Add helper function tcf_mirred_replace_dev

The act of replacing a device will be repeated by the init logic for the
block ID in the patch that allows mirred to a block. Therefore we
encapsulate this functionality in a function (tcf_mirred_replace_dev) so
that we can reuse it and avoid code repetition.

Co-developed-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Co-developed-by: Pedro Tammela <pctammela@mojatatu.com>
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Signed-off-by: Victor Nogueira <victor@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_mirred.c