DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, Tyler Retzlaff <roretzla@linux.microsoft.com>,
	 Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [PATCH v4 2/9] net/ring: build on Windows
Date: Thu, 9 Mar 2023 22:10:03 +0100	[thread overview]
Message-ID: <CAJFAV8znt1Vjrtxie49j2UJjNehuurmyPjbi2ZRy_Ti923CNqw@mail.gmail.com> (raw)
In-Reply-To: <20230219231416.22524-3-stephen@networkplumber.org>

On Mon, Feb 20, 2023 at 12:14 AM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> The command line arguments are stored in node_action_pair
> and the name[] was sized to PATH_MAX which does not exist on Windows.
> Since the name is either "CREATE" or "ATTACH" it is not
> related to PATH_MAX (4096).
>
> With this fix driver builds ok on windows, but need to modify the
> test meson build to skip the eventdev test on Windows.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---
>  app/test/meson.build            | 2 +-
>  drivers/net/ring/meson.build    | 6 ------
>  drivers/net/ring/rte_eth_ring.c | 4 +++-
>  3 files changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/app/test/meson.build b/app/test/meson.build
> index f34d19e3c3cb..a713f0382280 100644
> --- a/app/test/meson.build
> +++ b/app/test/meson.build
> @@ -390,7 +390,7 @@ if dpdk_conf.has('RTE_NET_BOND')
>          driver_test_names += 'link_bonding_mode4_autotest'
>      endif
>  endif
> -if dpdk_conf.has('RTE_NET_RING')
> +if dpdk_conf.has('RTE_LIB_EVENTDEV') and dpdk_conf.has('RTE_NET_RING')
>      test_deps += 'net_ring'
>      test_sources += 'test_pmd_ring_perf.c'
>      test_sources += 'test_pmd_ring.c'
> diff --git a/drivers/net/ring/meson.build b/drivers/net/ring/meson.build
> index 72792e26b05a..3534a3cc2287 100644
> --- a/drivers/net/ring/meson.build
> +++ b/drivers/net/ring/meson.build
> @@ -1,12 +1,6 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2017 Intel Corporation
>
> -if is_windows
> -    build = false
> -    reason = 'not supported on Windows'
> -    subdir_done()
> -endif
> -
>  sources = files('rte_eth_ring.c')
>  headers = files('rte_eth_ring.h')
>  pmd_supports_disable_iova_as_pa = true
> diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
> index bd5a47dd9017..e8bc9b627102 100644
> --- a/drivers/net/ring/rte_eth_ring.c
> +++ b/drivers/net/ring/rte_eth_ring.c
> @@ -9,6 +9,7 @@
>  #include <ethdev_driver.h>
>  #include <rte_malloc.h>
>  #include <rte_memcpy.h>
> +#include <rte_os_shim.h>

Is it still needed, since this patch drops use of PATH_MAX?


>  #include <rte_string_fns.h>
>  #include <bus_vdev_driver.h>
>  #include <rte_kvargs.h>
> @@ -17,6 +18,7 @@
>  #define ETH_RING_NUMA_NODE_ACTION_ARG  "nodeaction"
>  #define ETH_RING_ACTION_CREATE         "CREATE"
>  #define ETH_RING_ACTION_ATTACH         "ATTACH"
> +#define ETH_RING_ACTION_MAX_LEN                8 /* CREATE | ACTION */
>  #define ETH_RING_INTERNAL_ARG          "internal"
>  #define ETH_RING_INTERNAL_ARG_MAX_LEN  19 /* "0x..16chars..\0" */
>
> @@ -539,7 +541,7 @@ eth_dev_ring_create(const char *name,
>  }
>
>  struct node_action_pair {
> -       char name[PATH_MAX];
> +       char name[ETH_RING_ACTION_MAX_LEN];
>         unsigned int node;
>         enum dev_action action;
>  };
> --
> 2.39.1
>


-- 
David Marchand


  reply	other threads:[~2023-03-09 21:10 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01  1:44 [PATCH 0/8] Enable building more " Stephen Hemminger
2022-12-01  1:44 ` [PATCH 1/8] net/null: build null PMD " Stephen Hemminger
2022-12-01 23:51   ` Tyler Retzlaff
2022-12-01  1:44 ` [PATCH 2/8] net/ring: build " Stephen Hemminger
2022-12-01 23:52   ` Tyler Retzlaff
2022-12-14 23:18   ` Kadam, Pallavi
2022-12-15  3:22     ` Stephen Hemminger
2022-12-15 17:48       ` Tyler Retzlaff
2022-12-15 18:09         ` Dmitry Kozlyuk
2022-12-01  1:44 ` [PATCH 3/8] lpm: enable " Stephen Hemminger
2022-12-01 23:53   ` Tyler Retzlaff
2022-12-01  1:44 ` [PATCH 4/8] reorder: build " Stephen Hemminger
2022-12-01 23:53   ` Tyler Retzlaff
2022-12-01  1:44 ` [PATCH 5/8] ip_frag: enable " Stephen Hemminger
2022-12-01 23:54   ` Tyler Retzlaff
2022-12-01  1:44 ` [PATCH 6/8] rib: enable " Stephen Hemminger
2022-12-01 23:54   ` Tyler Retzlaff
2022-12-01  1:44 ` [PATCH 7/8] fib: " Stephen Hemminger
2022-12-01 23:54   ` Tyler Retzlaff
2022-12-01  1:44 ` [PATCH 8/8] pcapng: windows compatability Stephen Hemminger
2022-12-01 23:55   ` Tyler Retzlaff
2023-02-07  0:19 ` [PATCH v2 0/8] Enable building more libraries on Windows Stephen Hemminger
2023-02-07  0:19   ` [PATCH v2 1/8] net/null: build null PMD " Stephen Hemminger
2023-02-07  0:19   ` [PATCH v2 2/8] net/ring: build " Stephen Hemminger
2023-02-07  0:19   ` [PATCH v2 3/8] lpm: enable " Stephen Hemminger
2023-02-07  0:19   ` [PATCH v2 4/8] reorder: build " Stephen Hemminger
2023-02-07  0:19   ` [PATCH v2 5/8] ip_frag: enable " Stephen Hemminger
2023-02-07  0:19   ` [PATCH v2 6/8] rib: enable " Stephen Hemminger
2023-02-07  0:19   ` [PATCH v2 7/8] fib: " Stephen Hemminger
2023-02-07  0:19   ` [PATCH v2 8/8] pcapng: windows compatibility Stephen Hemminger
2023-02-07 22:13   ` [PATCH v2 0/8] Enable building more libraries on Windows Dmitry Kozlyuk
2023-02-09  9:16     ` David Marchand
2023-02-19 17:50   ` [PATCH v3 " Stephen Hemminger
2023-02-19 17:50     ` [PATCH v3 1/8] net/null: build null PMD " Stephen Hemminger
2023-02-19 17:50     ` [PATCH v3 2/8] net/ring: build " Stephen Hemminger
2023-02-19 17:50     ` [PATCH v3 3/8] lpm: enable " Stephen Hemminger
2023-02-19 17:50     ` [PATCH v3 4/8] reorder: build " Stephen Hemminger
2023-02-19 17:50     ` [PATCH v3 5/8] ip_frag: enable " Stephen Hemminger
2023-02-19 17:50     ` [PATCH v3 6/8] rib: enable " Stephen Hemminger
2023-02-19 17:50     ` [PATCH v3 7/8] fib: " Stephen Hemminger
2023-02-19 17:50     ` [PATCH v3 8/8] pcapng: windows compatibility Stephen Hemminger
2023-02-19 23:14   ` [PATCH v4 0/9] Enable building more libraries on Windows Stephen Hemminger
2023-02-19 23:14     ` [PATCH v4 1/9] net/null: build null PMD " Stephen Hemminger
2023-02-19 23:14     ` [PATCH v4 2/9] net/ring: build " Stephen Hemminger
2023-03-09 21:10       ` David Marchand [this message]
2023-03-09 21:21         ` Stephen Hemminger
2023-03-10  9:34           ` David Marchand
2023-02-19 23:14     ` [PATCH v4 3/9] lpm: enable " Stephen Hemminger
2023-02-19 23:14     ` [PATCH v4 4/9] reorder: build " Stephen Hemminger
2023-02-19 23:14     ` [PATCH v4 5/9] ip_frag: enable " Stephen Hemminger
2023-02-19 23:14     ` [PATCH v4 6/9] rib: enable " Stephen Hemminger
2023-02-19 23:14     ` [PATCH v4 7/9] fib: " Stephen Hemminger
2023-02-19 23:14     ` [PATCH v4 8/9] pcapng: windows compatibility Stephen Hemminger
2023-02-19 23:14     ` [PATCH v4 9/9] table: enable build on Windows Stephen Hemminger
2023-03-06 21:07       ` Tyler Retzlaff
2023-03-10 14:06     ` [PATCH v4 0/9] Enable building more libraries " David Marchand
2023-03-09 21:31 ` [PATCH v5 " Stephen Hemminger
2023-03-09 21:31   ` [PATCH v5 1/9] net/null: build null PMD " Stephen Hemminger
2023-03-09 21:31   ` [PATCH v5 2/9] net/ring: build " Stephen Hemminger
2023-03-09 21:31   ` [PATCH v5 3/9] lpm: enable " Stephen Hemminger
2023-03-09 21:31   ` [PATCH v5 4/9] reorder: build " Stephen Hemminger
2023-03-09 21:31   ` [PATCH v5 5/9] ip_frag: enable " Stephen Hemminger
2023-03-09 21:31   ` [PATCH v5 6/9] rib: enable " Stephen Hemminger
2023-03-09 21:31   ` [PATCH v5 7/9] fib: " Stephen Hemminger
2023-03-09 21:31   ` [PATCH v5 8/9] pcapng: windows compatibility Stephen Hemminger
2023-03-09 21:31   ` [PATCH v5 9/9] table: enable build on Windows Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJFAV8znt1Vjrtxie49j2UJjNehuurmyPjbi2ZRy_Ti923CNqw@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=roretzla@linux.microsoft.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).