From: "Xing, Beilei" <beilei.xing@intel.com>
To: "Yang, Qiming" <qiming.yang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Yang, Qiming" <qiming.yang@intel.com>
Subject: Re: [dpdk-dev] [PATCH v7 3/3] net/ice: add UDP tunnel port support
Date: Wed, 26 Jun 2019 07:07:53 +0000 [thread overview]
Message-ID: <94479800C636CB44BD422CB454846E013CDEA802@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20190625064815.3337-4-qiming.yang@intel.com>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qiming Yang
> Sent: Tuesday, June 25, 2019 2:48 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>
> Subject: [dpdk-dev] [PATCH v7 3/3] net/ice: add UDP tunnel port support
>
> Enabled UDP tunnel port add and delete functions.
>
> Signed-off-by: Qiming Yang <qiming.yang@intel.com>
> ---
> drivers/net/ice/ice_ethdev.c | 54
> ++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 54 insertions(+)
>
> diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index
> 8ee06d1..949d293 100644
> --- a/drivers/net/ice/ice_ethdev.c
> +++ b/drivers/net/ice/ice_ethdev.c
> @@ -88,6 +88,10 @@ static int ice_dev_filter_ctrl(struct rte_eth_dev *dev,
> enum rte_filter_type filter_type,
> enum rte_filter_op filter_op,
> void *arg);
> +static int ice_dev_udp_tunnel_port_add(struct rte_eth_dev *dev,
> + struct rte_eth_udp_tunnel *udp_tunnel); static int
> +ice_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
> + struct rte_eth_udp_tunnel *udp_tunnel);
>
> static const struct rte_pci_id pci_id_ice_map[] = {
> { RTE_PCI_DEVICE(ICE_INTEL_VENDOR_ID,
> ICE_DEV_ID_E810C_BACKPLANE) }, @@ -147,6 +151,8 @@ static const struct
> eth_dev_ops ice_eth_dev_ops = {
> .xstats_get_names = ice_xstats_get_names,
> .xstats_reset = ice_stats_reset,
> .filter_ctrl = ice_dev_filter_ctrl,
> + .udp_tunnel_port_add = ice_dev_udp_tunnel_port_add,
> + .udp_tunnel_port_del = ice_dev_udp_tunnel_port_del,
> };
>
> /* store statistics names and its offset in stats structure */ @@ -3665,6
> +3671,54 @@ ice_dev_filter_ctrl(struct rte_eth_dev *dev,
> return ret;
> }
>
> +/* Add UDP tunneling port */
> +static int
> +ice_dev_udp_tunnel_port_add(struct rte_eth_dev *dev,
> + struct rte_eth_udp_tunnel *udp_tunnel) {
> + int ret = 0;
> + struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data-
> >dev_private);
> +
> + if (udp_tunnel == NULL)
> + return -EINVAL;
> +
> + switch (udp_tunnel->prot_type) {
> + case RTE_TUNNEL_TYPE_VXLAN:
> + ret = ice_create_tunnel(hw, TNL_VXLAN, udp_tunnel-
> >udp_port);
> + break;
> + default:
> + PMD_DRV_LOG(ERR, "Invalid tunnel type");
> + ret = -1;
How about return -EINVAL here?
> + break;
> + }
> +
> + return ret;
> +}
> +
> +/* Delete UDP tunneling port */
> +static int
> +ice_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
> + struct rte_eth_udp_tunnel *udp_tunnel) {
> + int ret = 0;
> + struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data-
> >dev_private);
> +
> + if (udp_tunnel == NULL)
> + return -EINVAL;
> +
> + switch (udp_tunnel->prot_type) {
> + case RTE_TUNNEL_TYPE_VXLAN:
> + ret = ice_destroy_tunnel(hw, udp_tunnel->udp_port, 0);
> + break;
> + default:
> + PMD_DRV_LOG(ERR, "Invalid tunnel type");
> + ret = -1;
Ditto.
> + break;
> + }
> +
> + return ret;
> +}
> +
> static int
> ice_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
> struct rte_pci_device *pci_dev)
> --
> 2.9.5
next prev parent reply other threads:[~2019-06-26 7:07 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-03 9:05 [dpdk-dev] [PATCH 0/2] Enable rte_flow API in ice driver Qiming Yang
2019-06-03 9:05 ` [dpdk-dev] [PATCH 1/2] net/ice: enable switch filter Qiming Yang
2019-06-03 17:07 ` Aaron Conole
2019-06-04 2:02 ` Zhao1, Wei
2019-06-03 9:05 ` [dpdk-dev] [PATCH 2/2] net/ice: add generic flow API Qiming Yang
2019-06-12 7:50 ` [dpdk-dev] [PATCH v2 0/3] Enable rte_flow API in ice driver Qiming Yang
2019-06-12 7:50 ` [dpdk-dev] [PATCH v2 1/3] net/ice: enable switch filter Qiming Yang
2019-06-13 8:23 ` Wang, Xiao W
2019-06-14 9:46 ` Zhao1, Wei
2019-06-17 8:28 ` Wang, Xiao W
2019-06-18 1:57 ` Zhao1, Wei
2019-06-17 5:27 ` Xing, Beilei
2019-06-17 8:23 ` Zhao1, Wei
2019-06-17 8:51 ` Zhao1, Wei
2019-06-18 1:50 ` Xing, Beilei
2019-06-18 9:40 ` Ye Xiaolong
2019-06-19 3:06 ` Zhao1, Wei
2019-06-12 7:50 ` [dpdk-dev] [PATCH v2 2/3] net/ice: add generic flow API Qiming Yang
2019-06-17 5:50 ` Xing, Beilei
2019-06-17 6:02 ` Xing, Beilei
2019-06-17 9:19 ` Wang, Xiao W
2019-06-12 7:50 ` [dpdk-dev] [PATCH v2 3/3] net/ice: add UDP tunnel port support Qiming Yang
2019-06-20 5:34 ` [dpdk-dev] [PATCH v3 0/3] Enable rte_flow API in ice driver Qiming Yang
2019-06-20 5:34 ` [dpdk-dev] [PATCH v3 1/3] net/ice: enable switch filter Qiming Yang
2019-06-20 9:01 ` Wang, Xiao W
2019-06-20 9:12 ` Zhao1, Wei
2019-06-20 5:34 ` [dpdk-dev] [PATCH v3 2/3] net/ice: add generic flow API Qiming Yang
2019-06-20 9:32 ` Wang, Xiao W
2019-06-21 5:47 ` Yang, Qiming
2019-06-20 10:21 ` Wang, Xiao W
2019-06-20 13:33 ` Aaron Conole
2019-06-21 2:18 ` Yang, Qiming
2019-06-20 5:34 ` [dpdk-dev] [PATCH v3 3/3] net/ice: add UDP tunnel port support Qiming Yang
2019-06-21 6:13 ` [dpdk-dev] [PATCH v4 0/3] Enable rte_flow API in ice driver Qiming Yang
2019-06-21 6:13 ` [dpdk-dev] [PATCH v4 1/3] net/ice: enable switch filter Qiming Yang
2019-06-21 6:13 ` [dpdk-dev] [PATCH v4 2/3] net/ice: add generic flow API Qiming Yang
2019-06-21 6:13 ` [dpdk-dev] [PATCH v4 3/3] net/ice: add UDP tunnel port support Qiming Yang
2019-06-21 9:21 ` [dpdk-dev] [PATCH v5 0/3] Enable rte_flow API in ice driver Qiming Yang
2019-06-21 9:21 ` [dpdk-dev] [PATCH v5 1/3] net/ice: enable switch filter Qiming Yang
2019-06-21 9:21 ` [dpdk-dev] [PATCH v5 2/3] net/ice: add generic flow API Qiming Yang
2019-06-21 9:21 ` [dpdk-dev] [PATCH v5 3/3] net/ice: add UDP tunnel port support Qiming Yang
2019-06-21 14:46 ` [dpdk-dev] [PATCH v5 0/3] Enable rte_flow API in ice driver Aaron Conole
2019-06-24 6:15 ` [dpdk-dev] [PATCH v6 " Qiming Yang
2019-06-24 6:15 ` [dpdk-dev] [PATCH v6 1/3] net/ice: enable switch filter Qiming Yang
2019-06-24 6:15 ` [dpdk-dev] [PATCH v6 2/3] net/ice: add generic flow API Qiming Yang
2019-06-24 6:15 ` [dpdk-dev] [PATCH v6 3/3] net/ice: add UDP tunnel port support Qiming Yang
2019-06-25 6:48 ` [dpdk-dev] [PATCH v7 0/3] Enable rte_flow API in ice driver Qiming Yang
2019-06-25 6:48 ` [dpdk-dev] [PATCH v7 1/3] net/ice: enable switch filter Qiming Yang
2019-06-25 6:48 ` [dpdk-dev] [PATCH v7 2/3] net/ice: add generic flow API Qiming Yang
2019-06-25 6:48 ` [dpdk-dev] [PATCH v7 3/3] net/ice: add UDP tunnel port support Qiming Yang
2019-06-26 7:07 ` Xing, Beilei [this message]
2019-06-25 14:58 ` [dpdk-dev] [PATCH v7 0/3] Enable rte_flow API in ice driver Aaron Conole
2019-06-26 1:52 ` Yang, Qiming
2019-06-26 7:42 ` Ferruh Yigit
2019-06-26 8:26 ` Yang, Qiming
2019-06-26 15:52 ` Ye Xiaolong
2019-06-26 8:03 ` [dpdk-dev] [PATCH v8 " Qiming Yang
2019-06-26 8:03 ` [dpdk-dev] [PATCH v8 1/3] net/ice: enable switch filter Qiming Yang
2019-06-26 8:03 ` [dpdk-dev] [PATCH v8 2/3] net/ice: add generic flow API Qiming Yang
2019-06-26 8:03 ` [dpdk-dev] [PATCH v8 3/3] net/ice: add UDP tunnel port support Qiming Yang
2019-06-26 8:58 ` [dpdk-dev] [PATCH v8 0/4] Enable rte_flow API in ice driver Qiming Yang
2019-06-26 8:58 ` [dpdk-dev] [PATCH v8 1/4] net/ice: enable switch filter Qiming Yang
2019-06-26 8:58 ` [dpdk-dev] [PATCH v8 2/4] net/ice: add generic flow API Qiming Yang
2019-06-26 8:58 ` [dpdk-dev] [PATCH v8 3/4] net/ice: add UDP tunnel port support Qiming Yang
2019-06-26 8:58 ` [dpdk-dev] [PATCH v8 4/4] doc: add release note for generic flow Qiming Yang
2019-06-26 21:27 ` Thomas Monjalon
2019-06-27 2:04 ` Yang, Qiming
2019-06-26 13:25 ` [dpdk-dev] [PATCH v8 0/4] Enable rte_flow API in ice driver Xing, Beilei
2019-07-01 8:32 ` [dpdk-dev] [PATCH v9 0/3] " Qiming Yang
2019-07-01 8:32 ` [dpdk-dev] [PATCH v9 1/3] net/ice: enable switch filter Qiming Yang
2019-07-01 8:32 ` [dpdk-dev] [PATCH v9 2/3] net/ice: add generic flow API Qiming Yang
2019-07-01 8:32 ` [dpdk-dev] [PATCH v9 3/3] net/ice: add UDP tunnel port support Qiming Yang
2019-07-01 11:38 ` [dpdk-dev] [PATCH v9 0/3] Enable rte_flow API in ice driver Zhang, Qi Z
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=94479800C636CB44BD422CB454846E013CDEA802@SHSMSX101.ccr.corp.intel.com \
--to=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=qiming.yang@intel.com \
/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).