From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v10 12/20] unci: add netdevice ops Date: Wed, 5 Jul 2017 12:12:16 -0700 Message-ID: <20170705121216.0c005109@xeon-e3> References: <20170630165140.59594-1-ferruh.yigit@intel.com> <20170704161337.45926-1-ferruh.yigit@intel.com> <20170704161337.45926-13-ferruh.yigit@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, Bruce Richardson , Anatoly Burakov To: Ferruh Yigit Return-path: Received: from mail-pf0-f178.google.com (mail-pf0-f178.google.com [209.85.192.178]) by dpdk.org (Postfix) with ESMTP id B900C2C4A for ; Wed, 5 Jul 2017 21:12:23 +0200 (CEST) Received: by mail-pf0-f178.google.com with SMTP id q85so20666948pfq.1 for ; Wed, 05 Jul 2017 12:12:23 -0700 (PDT) In-Reply-To: <20170704161337.45926-13-ferruh.yigit@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 4 Jul 2017 17:13:29 +0100 Ferruh Yigit wrote: > +#if (KERNEL_VERSION(3, 9, 0) <= LINUX_VERSION_CODE) > +static int unci_net_change_carrier(struct net_device *dev, bool new_carrier) > +{ > + if (new_carrier) > + netif_carrier_on(dev); > + else > + netif_carrier_off(dev); > + return 0; > +} > +#endif Don't really need ndo_change_carrier. It is meant for layered devices like team device. For unci, the carrier state should always track what the DPDK driver reports.