Subject: Re: [PATCH net-next 4/4] net/sched: act_mirred: Implement ingress actions

From: Shmulik Ladkani <[email-masked]>
Date: Sun, 25 Sep 2016 20:59:32 +0300

Hi,

On Sat, 24 Sep 2016 17:07:12 -0700 Cong Wang <[email-masked]> wrote:
> One problem to use your code for us is that, the RX side of veth
> is inside containers, not visible to outside, perhaps we need some
> more parameter to tell the netns before the device name/index?
> Thoughts?

Well, this is way trickier...

tc_mirred doesn't cope with netns movement of the target device.
See 'mirred_device_event': upon NETDEV_UNREGISTER the 'tcfm_dev' gets
nullified.

(dev_change_net_namespace sequence includes NETDEV_UNREGISTER,
 dev_net_set, NETDEV_REGISTER).

As upposed to veth, which keeps the peer netdev pointer (since veth peers
lifetime is coupled), here in act_mirred we can't easily distinguish a
"real" NETDEV_UNREGISTER vs a namespace change...