From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 9EB082B9B for ; Thu, 25 Feb 2016 12:10:34 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 25 Feb 2016 03:10:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,498,1449561600"; d="scan'208";a="894422574" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by orsmga001.jf.intel.com with ESMTP; 25 Feb 2016 03:10:32 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.237]) by IRSMSX151.ger.corp.intel.com ([169.254.4.72]) with mapi id 14.03.0248.002; Thu, 25 Feb 2016 11:10:32 +0000 From: "Ananyev, Konstantin" To: "Tan, Jianfeng" , "dev@dpdk.org" Thread-Topic: [PATCH v2 07/12] pmd/ixgbe: add dev_ptype_info_get implementation Thread-Index: AQHRT5LDh5CkE4I7okifIDF/qcTVpp78qFcAgD/oEQCAAEpm4A== Date: Thu, 25 Feb 2016 11:10:31 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725836B0B2BD@irsmsx105.ger.corp.intel.com> References: <1451544799-70776-1-git-send-email-jianfeng.tan@intel.com> <1452836759-63540-1-git-send-email-jianfeng.tan@intel.com> <1452836759-63540-8-git-send-email-jianfeng.tan@intel.com> <2601191342CEEE43887BDE71AB97725836AE6159@irsmsx105.ger.corp.intel.com> <56CEA278.30900@intel.com> In-Reply-To: <56CEA278.30900@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzIwOWJjZTUtNTY1YS00ZDhmLTk4M2MtMGJkN2M3ZmZhMWUzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjRPeG1QQWVYUWQwWWYrOXVEaXJJOW12Z0kzRnEwdnMxbjJSOGlYQklzZ009In0= x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 07/12] pmd/ixgbe: add dev_ptype_info_get implementation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2016 11:10:35 -0000 > >> > >> +static int > >> +ixgbe_dev_ptype_info_get(struct rte_eth_dev *dev, uint32_t ptypes[]) > >> +{ > >> + int num =3D 0; > >> + > >> + if (dev->rx_pkt_burst =3D=3D ixgbe_recv_pkts || > >> + dev->rx_pkt_burst =3D=3D ixgbe_recv_pkts_lro_single_alloc || > >> + dev->rx_pkt_burst =3D=3D ixgbe_recv_pkts_lro_bulk_alloc || > >> + dev->rx_pkt_burst =3D=3D ixgbe_recv_pkts_bulk_alloc || > >> + dev->rx_pkt_burst =3D=3D ixgbe_recv_pkts_vec || > >> + dev->rx_pkt_burst =3D=3D ixgbe_recv_scattered_pkts_vec) { > > Is there any point in that big if above? > > All ixgbe recv functions support ptype recognition, so why to have it a= t all? > > Same question for igb. > > Konstantin >=20 > I'd like this code to put it explicitly instead of an "if > (dev->rx_pkt_burst)" to indicate that all ixgbe recv functions supports > these ptypes. >=20 > Is it make sense? It seems a bit of overhead to me, but if you would like to keep it as it is= , I wouldn't insist. Konstantin