Re: [Patch net-next] act_mirred: use tcfm_dev in tcf_mirred_get_dev()
From: Jiri Pirko <jiri@resnulli.us>
Date: 2017-12-03 06:39:07
From: Jiri Pirko <jiri@resnulli.us>
Date: 2017-12-03 06:39:07
Sat, Dec 02, 2017 at 08:53:20PM CET, xiyou.wangcong@gmail.com wrote:
On Sat, Dec 2, 2017 at 11:47 AM, Cong Wang [off-list ref] wrote:quoted
On Sat, Dec 2, 2017 at 12:57 AM, Jiri Pirko [off-list ref] wrote:quoted
Good. Please also use m->tcfm_dev->ifindex in tcf_mirred_dump and tcf_mirred_ifindex. Then you can remove tcfm_ifindex completely.Sounds good. Will send v2.Hold on, m->tcfm_dev could be NULL, so we can't just def it here. I think we can just use 0 when it is NULL: .ifindex = m->tcfm_dev ? m->tcfm_dev->ifindex : 0, This also "fixes" the garbage ifindex dump when the target device is gone.
Sounds fine.