patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Matan Azrad <matan@mellanox.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH 2/7] examples/l2fwd-cat: block attempts to use owned ports
Date: Sun, 15 Mar 2020 07:51:57 +0000	[thread overview]
Message-ID: <AM0PR0502MB4019F5EB028647E79EC708EED2F80@AM0PR0502MB4019.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20200312172047.19973-3-stephen@networkplumber.org>

Hi Stephen

From: Stephen Hemminger

I think the correct terminology here is (can be the title):
Make the application be port ownership aware.

Some applications may be ownership aware and others not.

> If a ethdev port is in use for a sub device, then it should not be allowed in the
> portmask of application.
> Fixes: 5b7ba31148a8 ("ethdev: add port ownership")
> Cc: matan@mellanox.com
> Cc: stable@dpdk.org
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  examples/l2fwd-cat/Makefile    | 2 ++
>  examples/l2fwd-cat/l2fwd-cat.c | 3 +++
>  examples/l2fwd-cat/meson.build | 1 +
>  3 files changed, 6 insertions(+)
> 
> diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile
> index b0e53c37e8d8..aa19347c1545 100644
> --- a/examples/l2fwd-cat/Makefile
> +++ b/examples/l2fwd-cat/Makefile
> @@ -20,6 +20,7 @@ static: build/$(APP)-static  PKGCONF ?= pkg-config
> 
>  PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)  LDFLAGS_SHARED =
> $(shell $(PKGCONF) --libs libdpdk)  LDFLAGS_STATIC = -Wl,-Bstatic $(shell
> $(PKGCONF) --static --libs libdpdk) @@ -65,6 +66,7 @@ endif
> 
>  EXTRA_CFLAGS += -O3 -g -Wfatal-errors
> 
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  CFLAGS += -I$(PQOS_INSTALL_PATH)/../include
> 
>  LDLIBS += -L$(PQOS_INSTALL_PATH)
> diff --git a/examples/l2fwd-cat/l2fwd-cat.c b/examples/l2fwd-cat/l2fwd-
> cat.c index 6838f288c621..c1c59b2d81f2 100644
> --- a/examples/l2fwd-cat/l2fwd-cat.c
> +++ b/examples/l2fwd-cat/l2fwd-cat.c
> @@ -42,6 +42,9 @@ port_init(uint16_t port, struct rte_mempool
> *mbuf_pool)
>  	if (!rte_eth_dev_is_valid_port(port))
>  		return -1;
> 
> +	if (!rte_eth_dev_is_owned_by(portid, RTE_ETH_DEV_NO_OWNER))
> {
> +		return -1;
> +
>  	/* Configure the Ethernet device. */
>  	retval = rte_eth_dev_configure(port, rx_rings, tx_rings,
> &port_conf);
>  	if (retval != 0)
> diff --git a/examples/l2fwd-cat/meson.build b/examples/l2fwd-
> cat/meson.build index 4e2777a03358..5c062c1354e3 100644
> --- a/examples/l2fwd-cat/meson.build
> +++ b/examples/l2fwd-cat/meson.build
> @@ -6,6 +6,7 @@
>  # To build this example as a standalone application with an already-installed
> # DPDK instance, use 'make'
> 
> +allow_experimental_apis = true
>  pqos = cc.find_library('pqos', required: false)  build = pqos.found()  ext_deps
> += pqos
> --
> 2.20.1


  reply	other threads:[~2020-03-15  7:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200312172047.19973-1-stephen@networkplumber.org>
2020-03-12 17:20 ` [dpdk-stable] [PATCH 1/7] ethdev: add function to test port ownership Stephen Hemminger
2020-03-15  7:45   ` Matan Azrad
2020-03-12 17:20 ` [dpdk-stable] [PATCH 2/7] examples/l2fwd-cat: block attempts to use owned ports Stephen Hemminger
2020-03-15  7:51   ` Matan Azrad [this message]
2020-03-12 17:20 ` [dpdk-stable] [PATCH 3/7] examples/l3fwd: " Stephen Hemminger
2020-03-12 17:20 ` [dpdk-stable] [PATCH 4/7] examples/l3fwd-acl: " Stephen Hemminger
2020-03-12 17:20 ` [dpdk-stable] [PATCH 5/7] examples/l3fwd-power: " Stephen Hemminger
2020-03-12 17:20 ` [dpdk-stable] [PATCH 6/7] examples/tep_termination: " Stephen Hemminger
2020-03-12 17:20 ` [dpdk-stable] [PATCH 7/7] examples/vhost: " Stephen Hemminger
     [not found] ` <20200316160923.5335-1-stephen@networkplumber.org>
2020-03-16 16:09   ` [dpdk-stable] [PATCH v2 2/6] examples/l2fwd-cat: " Stephen Hemminger
2020-03-16 16:09   ` [dpdk-stable] [PATCH v2 3/6] examples/l3fwd: " Stephen Hemminger
2020-03-16 16:09   ` [dpdk-stable] [PATCH v2 4/6] examples/l3fwd-acl: " Stephen Hemminger
2020-03-16 16:09   ` [dpdk-stable] [PATCH v2 5/6] examples/l3fwd-power: " Stephen Hemminger
2020-03-16 16:09   ` [dpdk-stable] [PATCH v2 6/6] examples/tep_termination: " Stephen Hemminger
     [not found] ` <20200402171953.13356-1-stephen@networkplumber.org>
2020-04-02 17:19   ` [dpdk-stable] [PATCH v3 2/6] examples/l2fwd-cat: make applicaton aware of port ownership Stephen Hemminger
2020-04-10 15:47     ` Ferruh Yigit
2020-04-02 17:19   ` [dpdk-stable] [PATCH v3 3/6] examples/l3fwd: " Stephen Hemminger
2020-04-02 17:19   ` [dpdk-stable] [PATCH v3 4/6] examples/l3fwd-acl: " Stephen Hemminger
2020-04-02 17:19   ` [dpdk-stable] [PATCH v3 5/6] examples/l3fwd-power: " Stephen Hemminger
2020-04-02 17:19   ` [dpdk-stable] [PATCH v3 6/6] examples/tep_termination: rework the port setup logic Stephen Hemminger
2020-04-10 16:16     ` Ferruh Yigit

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=AM0PR0502MB4019F5EB028647E79EC708EED2F80@AM0PR0502MB4019.eurprd05.prod.outlook.com \
    --to=matan@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --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).