From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from alln-iport-7.cisco.com (alln-iport-7.cisco.com [173.37.142.94]) by dpdk.org (Postfix) with ESMTP id B7F518041 for ; Tue, 16 Dec 2014 11:40:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3333; q=dns/txt; s=iport; t=1418726456; x=1419936056; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=u3jfSm12L7HkM8f976xoJ4Ipae2v4/amx9G1admUPCM=; b=eTx5LZ1GOshLPYgyJNtGhf3Rwf2rQoB/5Yck8DZw66FaCZIuTkJBVQdp 4FvKaFPS2LK8lgb/EJEwRwt1IxzGXNxwrM0yJTeAsjsiuJouEbsE7BXh0 cn/fNbd6/MlLe8/01tItRiFE0VKQnTVZa+cEWR4emxdKH53vBHhjRRyAl A=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoIFAJsLkFStJA2B/2dsb2JhbABagwaBKgTLZAKBHBYBAQEBAX2EDAEBAQQ6PwwEAgEIEQQBAQEeCQcyFAkIAgQBDQWILNQ/AQEBAQEBAQEBAQEBAQEBAQEBAQEBF49yBwaEIwEEjgKIb4ELgl6FbIdkIoNsboFFfgEBAQ X-IronPort-AV: E=Sophos;i="5.07,586,1413244800"; d="scan'208";a="106083785" Received: from alln-core-9.cisco.com ([173.36.13.129]) by alln-iport-7.cisco.com with ESMTP; 16 Dec 2014 10:40:55 +0000 Received: from xhc-rcd-x09.cisco.com (xhc-rcd-x09.cisco.com [173.37.183.83]) by alln-core-9.cisco.com (8.14.5/8.14.5) with ESMTP id sBGAethA014825 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 16 Dec 2014 10:40:55 GMT Received: from xmb-aln-x07.cisco.com ([169.254.2.173]) by xhc-rcd-x09.cisco.com ([173.37.183.83]) with mapi id 14.03.0195.001; Tue, 16 Dec 2014 04:40:55 -0600 From: "Sujith Sankar (ssujith)" To: "Burakov, Anatoly" , Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH] enic: corrected the usage of VFIO_PRESENT Thread-Index: AQHQFeRr1xRBtyDx5UWdyYsoypZs7pyRtUyAgACszQCAAAsoAIAAX20A//+kcICAAF11gA== Date: Tue, 16 Dec 2014 10:40:54 +0000 Message-ID: References: <1418372303-31565-1-git-send-email-ssujith@cisco.com> <5911790.4rCTPaIceN@xps13> In-Reply-To: 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:40:57 -0000 On 16/12/14 4:06 pm, "Burakov, Anatoly" wrote: >> -----Original Message----- >> From: Sujith Sankar (ssujith) [mailto:ssujith@cisco.com] >> Sent: Tuesday, December 16, 2014 10:34 AM >> To: Burakov, Anatoly; Thomas Monjalon >> Cc: dev@dpdk.org >> Subject: Re: [dpdk-dev] [PATCH] enic: corrected the usage of >>VFIO_PRESENT >>=20 >>=20 >>=20 >> On 16/12/14 3:52 pm, "Burakov, Anatoly" >> wrote: >>=20 >> >> 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 >> >> >> >> >> >> #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. >> >> >> >> 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 */ >> >> >> } >> >> >> >> >> >> +#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, >> >> >> >> >> >> enic_log_q_error(enic); >> >> >> } >> >> >> +#endif >> >> > >> >> >-- >> >> >Thomas >> > >> >Hi Sujith >> > >> >Thomas is correct, VFIO code is designed to be EAL-only (mainly because >> >it's Linuxapp-specific, and PMD's are intended to be cross-platform at >> >least when it comes to compilation). Whatever it is that you're working >> >around is better fixed in the EAL itself rather than in the PMD. >>=20 >> I agree with you and Thomas. Let me find the root cause for the false >>trigger. >>=20 >> Thanks, >> -Sujith >>=20 > >You may find it in EAL VFIO interrupts code. When VFIO enables some >interrupt types, it manually sends a trigger. Normally, this "trigger" >just enables interrupts, but maybe for ENIC it's different. I therefore >suggest you to look there first. Ok. Thanks for the info, Anatoly. ENIC does not need that trigger. Let me take a look at that first. Thanks, -Sujith > >Thanks, >Anatoly