From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 7B9F01C00 for ; Mon, 4 Dec 2017 20:59:27 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Dec 2017 11:59:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,361,1508828400"; d="scan'208";a="8989166" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.241.225.178]) ([10.241.225.178]) by FMSMGA003.fm.intel.com with ESMTP; 04 Dec 2017 11:59:26 -0800 To: Jingjing Wu , dev@dpdk.org Cc: wenzhuo.lu@intel.com References: <1508488012-82704-1-git-send-email-jingjing.wu@intel.com> <1511505206-97333-1-git-send-email-jingjing.wu@intel.com> <1511505206-97333-8-git-send-email-jingjing.wu@intel.com> From: Ferruh Yigit Message-ID: Date: Mon, 4 Dec 2017 11:59:26 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1511505206-97333-8-git-send-email-jingjing.wu@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2 07/14] net/avf: enable ops for MAC VLAN offload X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 19:59:28 -0000 On 11/23/2017 10:33 PM, Jingjing Wu wrote: > - promiscuous_enable > - promiscuous_disable > - allmulticast_enable > - allmulticast_disable > - mac_addr_add > - mac_addr_remove > - mac_addr_set > - vlan_filter_set > - vlan_offload_set Patch title is misleading. > > Signed-off-by: Jingjing Wu <....> > +static int > +avf_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on) > +{ > + struct avf_adapter *adapter = > + AVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); > + struct avf_info *vf = AVF_DEV_PRIVATE_TO_VF(adapter); > + int err; > + > + if (!(vf->vf_res->vf_offload_flags & VIRTCHNL_VF_OFFLOAD_VLAN)) > + return -ENOTSUP; > + > + err = avf_add_del_vlan(adapter, vlan_id, on); > + if (err) > + return -EIO; Compiler complains about missing return. > +} > + > +static int > +avf_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask) > +{ > + struct avf_adapter *adapter = > + AVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); > + struct avf_info *vf = AVF_DEV_PRIVATE_TO_VF(adapter); > + struct rte_eth_conf *dev_conf = &dev->data->dev_conf; > + int err; > + > + if (!(vf->vf_res->vf_offload_flags & VIRTCHNL_VF_OFFLOAD_VLAN)) > + return -ENOTSUP; > + > + /* Vlan stripping setting */ > + if (mask & ETH_VLAN_STRIP_MASK) { > + /* Enable or disable VLAN stripping */ > + if (dev_conf->rxmode.hw_vlan_strip) > + err = avf_enable_vlan_strip(adapter); > + else > + err = avf_disable_vlan_strip(adapter); > + } > + > + if (err) > + return -EIO; Same here, missing return.