From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcdn-iport-4.cisco.com (rcdn-iport-4.cisco.com [173.37.86.75]) by dpdk.org (Postfix) with ESMTP id 69D681F7 for ; Tue, 16 Dec 2014 11:00:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2644; q=dns/txt; s=iport; t=1418724025; x=1419933625; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=6AYg4Ql1UgtY2KOWYl7unJCdJUp56+HJ9F/8/laDR9Y=; b=dYtSYCtH5LVLo3cV2WwQZU7bWAr1vG34iu9JzHggeyeOijwZB/vAhe+q aaqqUmZU9XCId2W+OYhbeAbm8HJ+GTgj4XQuEU8wWyZZOgg1zA/jWwXYf eUDUBGq46JdbKhcQoRzLcgXcYbHvHgTvBxSuXcLeW+3v2/iHPFZ5nxkLJ c=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoEFAE4BkFStJA2K/2dsb2JhbABagwaBKgTLZAKBHBYBAQEBAX2EDQEBBDo/EAIBCBgWAQcQMiUCBAENBYgs1FABAQEBAQEBAQEBAQEBAQEBAQEBAQEXj3IHEgGEFgEEjgKGc4F8gQuCXoVshCyDOCKDbG6BBQcXIn4BAQE X-IronPort-AV: E=Sophos;i="5.07,585,1413244800"; d="scan'208";a="380667004" Received: from alln-core-5.cisco.com ([173.36.13.138]) by rcdn-iport-4.cisco.com with ESMTP; 16 Dec 2014 10:00:24 +0000 Received: from xhc-rcd-x13.cisco.com (xhc-rcd-x13.cisco.com [173.37.183.87]) by alln-core-5.cisco.com (8.14.5/8.14.5) with ESMTP id sBGA0Nik001265 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 16 Dec 2014 10:00:24 GMT Received: from xmb-aln-x07.cisco.com ([169.254.2.173]) by xhc-rcd-x13.cisco.com ([173.37.183.87]) with mapi id 14.03.0195.001; Tue, 16 Dec 2014 04:00:23 -0600 From: "Sujith Sankar (ssujith)" To: "Qiu, Michael" , Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH] enic: corrected the usage of VFIO_PRESENT Thread-Index: AQHQFeRr1xRBtyDx5UWdyYsoypZs7pySw0KA Date: Tue, 16 Dec 2014 10:00:22 +0000 Message-ID: References: <1418372303-31565-1-git-send-email-ssujith@cisco.com> <5911790.4rCTPaIceN@xps13> <533710CFB86FA344BFBF2D6802E60286CA02DA@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <533710CFB86FA344BFBF2D6802E60286CA02DA@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.9.131030 x-originating-ip: [10.65.51.177] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] enic: corrected the usage of VFIO_PRESENT 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: Tue, 16 Dec 2014 10:00:26 -0000 On 16/12/14 1:21 pm, "Qiu, Michael" wrote: >On 12/16/2014 12:13 PM, Sujith Sankar (ssujith) wrote: >> On 16/12/14 4:54 am, "Thomas Monjalon" >>wrote: >> >>> 2014-12-12 13:48, Sujith Sankar: >>>> This patch corrects the usage of the flag VFIO_PRESENT in enic driver. >>> Please, could you explain why the flag VFIO_PRESENT was not well used? >> Without including eal_vfio.h, VFIO_PRESENT is not available in enic. >> Hence VFIO specific code in enic was not getting compiled and some >>errors >> were generated during run-time. >> >>>> This has uncovered a few warnings, and this patch corrects those too. >>> [...] >>>> --- a/lib/librte_pmd_enic/enic_main.c >>>> +++ b/lib/librte_pmd_enic/enic_main.c >>>> @@ -39,6 +39,7 @@ >>>> #include >>>> #include >>>> #include >>>> +#include >>>> =20 >>>> #include >>>> #include >>>> @@ -46,6 +47,7 @@ >>>> #include >>>> #include >>>> #include >>>> +#include >>> This header was not designed to be included by PMDs. >>> It will break compilation on BSD. >> Is there an alternative to make VFIO_PRESENT available in enic? Please >> advise. > >You can remove VFIO_PRESENT check, it all been done in eal, you can >check other nic pmds for reference. >And seems you done the interrupt logic all by your self? > >Thanks, >Michael Thanks for the comment, Michael. Without the code under VFIO_PRESENT flag, I was getting false notification of interrupt at the beginning (cat /proc/interrupts showed all 0s). Let me try to root cause it. I shall get back after some debugging and testing. There was one more reason behind doing interrupt logic in enic. No matter how many interrupts the user configures, enic pmd needs only one. There is no way to communicate that to the EAL. I thought doing interrupt login in enic could avoid registering that many interrupts. Thanks, -Sujith >> =20 >> Thanks, >> -Sujith >> >>>> #include "enic_compat.h" >>>> #include "enic.h" >>>> @@ -561,6 +563,7 @@ enic_free_consistent(__rte_unused struct >>>> rte_pci_device *hwdev, >>>> /* Nothing to be done */ >>>> } >>>> =20 >>>> +#ifndef VFIO_PRESENT >>>> static void >>>> enic_intr_handler(__rte_unused struct rte_intr_handle *handle, >>>> void *arg) >>>> @@ -572,6 +575,7 @@ enic_intr_handler(__rte_unused struct >>>> rte_intr_handle *handle, >>>> =20 >>>> enic_log_q_error(enic); >>>> } >>>> +#endif >>> --=20 >>> Thomas >> >