From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [Patch net-next v2] act_mirred: get rid of tcfm_ifindex from struct tcf_mirred Date: Wed, 6 Dec 2017 09:33:48 +0100 Message-ID: <20171206083348.GA1823@nanopsycho> References: <20171206001727.25731-1-xiyou.wangcong@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, Jiri Pirko , Jamal Hadi Salim To: Cong Wang Return-path: Received: from mail-wr0-f195.google.com ([209.85.128.195]:43570 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754469AbdLFIdw (ORCPT ); Wed, 6 Dec 2017 03:33:52 -0500 Received: by mail-wr0-f195.google.com with SMTP id z34so2950197wrz.10 for ; Wed, 06 Dec 2017 00:33:51 -0800 (PST) Content-Disposition: inline In-Reply-To: <20171206001727.25731-1-xiyou.wangcong@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: Wed, Dec 06, 2017 at 01:17:26AM CET, xiyou.wangcong@gmail.com wrote: >tcfm_dev always points to the correct netdev and we already >hold a refcnt, so no need to use tcfm_ifindex to lookup again. > >If we would support moving target netdev across netns, using >pointer would be better than ifindex. > >This also fixes dumping obsolete ifindex, now after the >target device is gone we just dump 0 as ifindex. > >Cc: Jiri Pirko >Cc: Jamal Hadi Salim >Signed-off-by: Cong Wang Acked-by: Jiri Pirko Thanks!