From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 3D96A231C for ; Thu, 27 Nov 2014 18:01:51 +0100 (CET) Received: by mail-wg0-f42.google.com with SMTP id z12so6969007wgg.1 for ; Thu, 27 Nov 2014 09:01:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=+vH/bdxhnxNPsXiYLjRzTgzCeR/8CqwdHjhmC9ZXHpo=; b=QW5Y+VLHdTGV9JLQi5zXY+iaSUUegsJCE/ViEfuIcl7MHFHHUWJ+AJ9u4vA88tLrAR WYKvBBT0WDeaLMFsWydfU40ZXo28PQj90UoBMzPku/45lMmdAwUcSWObjlmmVp3yKjdI ffMnJiNNK1sMoguAQYxW3WJuWqTAI6anKfBilnNGRXj4Hk3O/ymoN9orOrKUd96UGE53 bRAkSK2y9bA/lwvp1PwBNIfjpjFAsnRj5D1afjdDGtmEC+a4fZQUGOHONhsgyUsrGCto qQjxMAHu62r1cVA885NvGXoLkbOHCuMKBvaFObiVa5kalbXQDpF56YR5m0gNqe4sjXa/ 63ng== X-Gm-Message-State: ALoCoQnlf9TGxmVjgAkOklsx6xwvoN/rHtO0i0NG9DZH6xq1mP0W6xjzHXNsf2jfFjHy/6TF9YKE X-Received: by 10.180.20.163 with SMTP id o3mr54190871wie.12.1417107711053; Thu, 27 Nov 2014 09:01:51 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id w10sm11499544wje.10.2014.11.27.09.01.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Nov 2014 09:01:50 -0800 (PST) From: Thomas Monjalon To: Jincheng Miao Date: Thu, 27 Nov 2014 18:01:27 +0100 Message-ID: <7579030.6nSHmmQ36o@xps13> Organization: 6WIND User-Agent: KMail/4.14.3 (Linux/3.17.4-1-ARCH; KDE/4.14.3; x86_64; ; ) In-Reply-To: <1414741039-3531-2-git-send-email-jmiao@redhat.com> References: <1414741039-3531-1-git-send-email-jmiao@redhat.com> <1414741039-3531-2-git-send-email-jmiao@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 1/2] igb_uio: compatible with upstream longterm kernel and RHEL6 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, 27 Nov 2014 17:01:51 -0000 2014-10-31 15:37, Jincheng Miao: > Function pci_num_vf() is introduced from upstream linux-2.6.34. So > this patch make compatible with longterm kernel linux-2.6.32.63. > > For RHEL6's kernel, although it is based on linux-2.6.32, it has > pci_num_vf() implementation. As the same with commit 11ba0426, > pci_num_vf() is defined from RHEL6. So we should check the macro > RHEL_RELEASE_CODE to consider this situation. Please, could you explain in which case CONFIG_PCI_IOV is defined? The logic is a bit difficult to understand. > #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34) && \ > - !defined(CONFIG_PCI_IOV) > + (!(defined(RHEL_RELEASE_CODE) && \ > + RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6, 0) && \ > + defined(CONFIG_PCI_IOV))) > > static int pci_num_vf(struct pci_dev *dev) > {