From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <xiaolong.ye@intel.com>
Received: from mga11.intel.com (mga11.intel.com [192.55.52.93])
 by dpdk.org (Postfix) with ESMTP id 0205A4C93
 for <dev@dpdk.org>; Tue,  2 Apr 2019 17:15:18 +0200 (CEST)
X-Amp-Result: UNKNOWN
X-Amp-Original-Verdict: FILE UNKNOWN
X-Amp-File-Uploaded: False
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 02 Apr 2019 08:15:16 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.60,301,1549958400"; d="scan'208";a="147393606"
Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.110.206])
 by orsmga002.jf.intel.com with ESMTP; 02 Apr 2019 08:15:15 -0700
Date: Tue, 2 Apr 2019 23:10:27 +0800
From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, David Marchand <david.marchand@redhat.com>,
 Andrew Rybchenko <arybchenko@solarflare.com>,
 Olivier Matz <olivier.matz@6wind.com>, Qi Zhang <qi.z.zhang@intel.com>,
 Karlsson Magnus <magnus.karlsson@intel.com>,
 Topel Bjorn <bjorn.topel@intel.com>,
 Maxime Coquelin <maxime.coquelin@redhat.com>,
 Ferruh Yigit <ferruh.yigit@intel.com>, Luca Boccassi <bluca@debian.org>,
 Bruce Richardson <bruce.richardson@intel.com>,
 Ananyev Konstantin <konstantin.ananyev@intel.com>
Message-ID: <20190402151027.GA110864@intel.com>
References: <20190301080947.91086-1-xiaolong.ye@intel.com>
 <20190402104554.110516-1-xiaolong.ye@intel.com>
 <20190402104554.110516-2-xiaolong.ye@intel.com>
 <20190402075806.7523ad34@shemminger-XPS-13-9360>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20190402075806.7523ad34@shemminger-XPS-13-9360>
User-Agent: Mutt/1.9.4 (2018-02-28)
Subject: Re: [dpdk-dev] [PATCH v8 1/1] net/af_xdp: introduce AF XDP PMD
	driver
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Apr 2019 15:15:19 -0000

On 04/02, Stephen Hemminger wrote:
>On Tue,  2 Apr 2019 18:45:54 +0800
>Xiaolong Ye <xiaolong.ye@intel.com> wrote:
>
>> +
>> +#include <rte_mbuf.h>
>> +#include <rte_ethdev_driver.h>
>> +#include <rte_ethdev_vdev.h>
>> +#include <rte_malloc.h>
>> +#include <rte_kvargs.h>
>> +#include <rte_bus_vdev.h>
>> +#include <rte_string_fns.h>
>> +
>> +#include <linux/if_ether.h>
>> +#include <linux/if_xdp.h>
>> +#include <linux/if_link.h>
>> +#include <asm/barrier.h>
>> +#include <arpa/inet.h>
>> +#include <net/if.h>
>> +#include <sys/types.h>
>> +#include <sys/socket.h>
>> +#include <sys/ioctl.h>
>> +#include <sys/mman.h>
>> +#include <unistd.h>
>> +#include <poll.h>
>> +#include <bpf/bpf.h>
>> +#include <xsk.h>
>
>The ordering here seems surprising. The usual ordering is:
>
>Libc includes:
>#include <stdio.h>
>...
>Sys includes:
>#include <sys/types.h>
>
>Linux includes:
>#include <linux/if_xdp.h>
>
>DPDK includes:
>#include <rte_mbuf.h>
>
>
>If I run "Include what you use" it has different suggestions.
>Some of which you should ignore but overall there are
>several good ones.
>
>rte_eth_af_xdp.c should add these lines:
>#include <asm/int-ll64.h>           // for __u64
>#include <bits/stdint-uintn.h>      // for uint16_t, uint64_t, uint32_t
>#include <errno.h>                  // for EINVAL, errno, EAGAIN, ENOMEM, EBUSY
>#include <netinet/in.h>             // for IPPROTO_IP
>#include <rte_ethdev.h>             // for rte_eth_dev, rte_eth_dev_data
>#include <stdlib.h>                 // for strtol
>#include <string.h>                 // for NULL, memset, strlen
>#include "rte_branch_prediction.h"  // for unlikely
>#include "rte_common.h"             // for __rte_unused, RTE_MIN, RTE_PRIORI...
>#include "rte_config.h"             // for RTE_PKTMBUF_HEADROOM
>#include "rte_dev.h"                // for rte_device, RTE_PMD_REGISTER_PARA...
>#include "rte_eal.h"                // for rte_eal_process_type, rte_proc_ty...
>#include "rte_ethdev.h"             // for rte_eth_stats, rte_eth_dev_info
>#include "rte_ether.h"              // for ETHER_ADDR_LEN, ether_addr
>#include "rte_lcore.h"              // for rte_socket_id
>#include "rte_log.h"                // for rte_log, RTE_LOG_ERR, RTE_LOG_INFO
>#include "rte_memory.h"             // for SOCKET_ID_ANY
>#include "rte_memzone.h"            // for rte_memzone_free, RTE_MEMZONE_IOV...
>#include "rte_ring.h"               // for rte_ring_free, rte_ring_create
>struct rte_mempool;
>
>rte_eth_af_xdp.c should remove these lines:
>- #include <arpa/inet.h>  // lines 17-17
>- #include <poll.h>  // lines 24-24
>- #include <rte_ethdev_vdev.h>  // lines 7-7
>- #include <sys/mman.h>  // lines 22-22
>- #include <sys/types.h>  // lines 19-19
>

Thanks for pointing out, I'll adjust the headers.

Thanks,
Xiaolong
>
>
>

From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id 8BD8DA0679
	for <public@inbox.dpdk.org>; Tue,  2 Apr 2019 17:15:34 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 5DDD54F9B;
	Tue,  2 Apr 2019 17:15:20 +0200 (CEST)
Received: from mga11.intel.com (mga11.intel.com [192.55.52.93])
 by dpdk.org (Postfix) with ESMTP id 0205A4C93
 for <dev@dpdk.org>; Tue,  2 Apr 2019 17:15:18 +0200 (CEST)
X-Amp-Result: UNKNOWN
X-Amp-Original-Verdict: FILE UNKNOWN
X-Amp-File-Uploaded: False
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 02 Apr 2019 08:15:16 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.60,301,1549958400"; d="scan'208";a="147393606"
Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.110.206])
 by orsmga002.jf.intel.com with ESMTP; 02 Apr 2019 08:15:15 -0700
Date: Tue, 2 Apr 2019 23:10:27 +0800
From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, David Marchand <david.marchand@redhat.com>,
 Andrew Rybchenko <arybchenko@solarflare.com>,
 Olivier Matz <olivier.matz@6wind.com>, Qi Zhang <qi.z.zhang@intel.com>,
 Karlsson Magnus <magnus.karlsson@intel.com>,
 Topel Bjorn <bjorn.topel@intel.com>,
 Maxime Coquelin <maxime.coquelin@redhat.com>,
 Ferruh Yigit <ferruh.yigit@intel.com>, Luca Boccassi <bluca@debian.org>,
 Bruce Richardson <bruce.richardson@intel.com>,
 Ananyev Konstantin <konstantin.ananyev@intel.com>
Message-ID: <20190402151027.GA110864@intel.com>
References: <20190301080947.91086-1-xiaolong.ye@intel.com>
 <20190402104554.110516-1-xiaolong.ye@intel.com>
 <20190402104554.110516-2-xiaolong.ye@intel.com>
 <20190402075806.7523ad34@shemminger-XPS-13-9360>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
In-Reply-To: <20190402075806.7523ad34@shemminger-XPS-13-9360>
User-Agent: Mutt/1.9.4 (2018-02-28)
Subject: Re: [dpdk-dev] [PATCH v8 1/1] net/af_xdp: introduce AF XDP PMD
	driver
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>
Message-ID: <20190402151027.AAlEy_jY0ElQkdI1R9XvmvfkDcWhCxDdSF0pJGdNlG4@z>

On 04/02, Stephen Hemminger wrote:
>On Tue,  2 Apr 2019 18:45:54 +0800
>Xiaolong Ye <xiaolong.ye@intel.com> wrote:
>
>> +
>> +#include <rte_mbuf.h>
>> +#include <rte_ethdev_driver.h>
>> +#include <rte_ethdev_vdev.h>
>> +#include <rte_malloc.h>
>> +#include <rte_kvargs.h>
>> +#include <rte_bus_vdev.h>
>> +#include <rte_string_fns.h>
>> +
>> +#include <linux/if_ether.h>
>> +#include <linux/if_xdp.h>
>> +#include <linux/if_link.h>
>> +#include <asm/barrier.h>
>> +#include <arpa/inet.h>
>> +#include <net/if.h>
>> +#include <sys/types.h>
>> +#include <sys/socket.h>
>> +#include <sys/ioctl.h>
>> +#include <sys/mman.h>
>> +#include <unistd.h>
>> +#include <poll.h>
>> +#include <bpf/bpf.h>
>> +#include <xsk.h>
>
>The ordering here seems surprising. The usual ordering is:
>
>Libc includes:
>#include <stdio.h>
>...
>Sys includes:
>#include <sys/types.h>
>
>Linux includes:
>#include <linux/if_xdp.h>
>
>DPDK includes:
>#include <rte_mbuf.h>
>
>
>If I run "Include what you use" it has different suggestions.
>Some of which you should ignore but overall there are
>several good ones.
>
>rte_eth_af_xdp.c should add these lines:
>#include <asm/int-ll64.h>           // for __u64
>#include <bits/stdint-uintn.h>      // for uint16_t, uint64_t, uint32_t
>#include <errno.h>                  // for EINVAL, errno, EAGAIN, ENOMEM, EBUSY
>#include <netinet/in.h>             // for IPPROTO_IP
>#include <rte_ethdev.h>             // for rte_eth_dev, rte_eth_dev_data
>#include <stdlib.h>                 // for strtol
>#include <string.h>                 // for NULL, memset, strlen
>#include "rte_branch_prediction.h"  // for unlikely
>#include "rte_common.h"             // for __rte_unused, RTE_MIN, RTE_PRIORI...
>#include "rte_config.h"             // for RTE_PKTMBUF_HEADROOM
>#include "rte_dev.h"                // for rte_device, RTE_PMD_REGISTER_PARA...
>#include "rte_eal.h"                // for rte_eal_process_type, rte_proc_ty...
>#include "rte_ethdev.h"             // for rte_eth_stats, rte_eth_dev_info
>#include "rte_ether.h"              // for ETHER_ADDR_LEN, ether_addr
>#include "rte_lcore.h"              // for rte_socket_id
>#include "rte_log.h"                // for rte_log, RTE_LOG_ERR, RTE_LOG_INFO
>#include "rte_memory.h"             // for SOCKET_ID_ANY
>#include "rte_memzone.h"            // for rte_memzone_free, RTE_MEMZONE_IOV...
>#include "rte_ring.h"               // for rte_ring_free, rte_ring_create
>struct rte_mempool;
>
>rte_eth_af_xdp.c should remove these lines:
>- #include <arpa/inet.h>  // lines 17-17
>- #include <poll.h>  // lines 24-24
>- #include <rte_ethdev_vdev.h>  // lines 7-7
>- #include <sys/mman.h>  // lines 22-22
>- #include <sys/types.h>  // lines 19-19
>

Thanks for pointing out, I'll adjust the headers.

Thanks,
Xiaolong
>
>
>