From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sujith Sankar (ssujith)" Subject: Re: [PATCH] enic: corrected the usage of VFIO_PRESENT Date: Tue, 16 Dec 2014 04:12:41 +0000 Message-ID: References: <1418372303-31565-1-git-send-email-ssujith@cisco.com> <5911790.4rCTPaIceN@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev-VfR2kkLFssw@public.gmane.org" To: Thomas Monjalon Return-path: In-Reply-To: <5911790.4rCTPaIceN@xps13> Content-Language: en-US Content-ID: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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. 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