From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id 39C212B9D for ; Wed, 9 Mar 2016 02:05:50 +0100 (CET) Received: by mail-wm0-f45.google.com with SMTP id p65so172186950wmp.1 for ; Tue, 08 Mar 2016 17:05:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=lVfev1j4D5cqM8BpiB618vHRfpVftYhM4oJRT7fMypQ=; b=COs7rf8WL5eSrc3Q5PBoLXzODw2TPGqk6eDZXqnw64j8EQ4yH5TU7RoLaJpGP2GQEa WvVor3CuSF4Sw/Fc1xaVrDu3SRq8JBaN4jQBiMq4HdtJUWdqimP4lcBq5YaEltEv6o+S 4YxW4tDXAJ/xQXfM4l44LA9SSIKiX05mYpKQlHL279fEyvaAfbZrbKV8DzY1Cp1LQFVI qYlQ+KuXkEn4fZsnJyBr1tDm+WERvAwqg44Jn3HQrj/W0L8iDNfisBMDahYvEPv6a4mD /7TducA6G77k0gyFtIT29VBLrm8MB7vdjsKyWiqLbWU2ZPOY2O+YcwIXMz1dEGWxmCD0 KAAw== 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; bh=lVfev1j4D5cqM8BpiB618vHRfpVftYhM4oJRT7fMypQ=; b=MFHRiSGXQsYhxRV1gbYxAdLuPqo5mghtdlqWtZjZhJOMFV4Hw1fJMyLwwB7xp9OMU+ lDENEqXbjiVDdsMdTBqIvXnkmQzPe6sLb5S+RyvRZ1a+kQobJYHfB3LaUabBHXpphbd5 s1YU7oCHxzypW1FTb4AhldRnQtXLgvROK2eIUHa1uz6ETs0prro8EGoEXe9lOON2Zxbo ysHjIHcOmZeC1ZlUDM+lu4G+Lr3a1Eribmw1FuaWh/pgZ3F7SvTV/vzLcH0A8bmmNsCE 1132jLttLK2BiiX4NC3yWJh5INLYoaoDODCDtgAPHQ63BFENXI0LDF//0nZP0dFHDgwh vOYw== X-Gm-Message-State: AD7BkJIg1vM2Gf/wBpBtjnuM0AUxv5U6ReJbB/pQfMCYGBWUd1Oz7Ae1k9Bu+Z4PwBYlbJ4b X-Received: by 10.28.60.84 with SMTP id j81mr22758893wma.91.1457485550101; Tue, 08 Mar 2016 17:05:50 -0800 (PST) Received: from xps13.localnet (171.36.101.84.rev.sfr.net. [84.101.36.171]) by smtp.gmail.com with ESMTPSA id vw2sm5384975wjc.43.2016.03.08.17.05.49 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2016 17:05:49 -0800 (PST) From: Thomas Monjalon To: "Lu, Wenzhuo" Date: Wed, 09 Mar 2016 02:04:11 +0100 Message-ID: <35564540.2poe2s7h25@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <6A0DE07E22DDAD4C9103DF62FEBC090903439160@shsmsx102.ccr.corp.intel.com> References: <1452496044-17524-1-git-send-email-wenzhuo.lu@intel.com> <1916349.pcHeyTKjoM@xps13> <6A0DE07E22DDAD4C9103DF62FEBC090903439160@shsmsx102.ccr.corp.intel.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 v7 1/5] lib/librte_ether: change function name of tunnel port config 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: Wed, 09 Mar 2016 01:05:50 -0000 2016-03-09 00:53, Lu, Wenzhuo: > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > 2016-03-04 10:35, Wenzhuo Lu: > > > The names of function for tunnel port configuration are not accurate. > > > They're tunnel_add/del, better change them to tunnel_port_add/del. > > > > As a lot of ethdev API, it is really badly documented. > > > > Please explain why this renaming and let's try to reword the > > doxygen: > > * Add UDP tunneling port of an Ethernet device for filtering a specific > > * tunneling packet by UDP port number. > > As we discussed before, these APIs only change the UDP port value of the tunnel. > But according to their names, seems like they're trying to add/delete a whole tunnel. > The names don't tell us what the functions really do, so we want to change the names. Neither the comment nor the name explain what means filtering here. I think we should explain more. We add a port number and a protocol type. What is it made for? > > Please what are the values of > > struct rte_eth_udp_tunnel { > > uint16_t udp_port; > > uint8_t prot_type; > > }; > > > When I see an API struct without any comment, I feel it must be dropped. > I'm confused. I don't do anything about this structure. You want me to add more comments for it? Yes please, comment at least prot_type. Which values to set? Any reference to some constants? > > By the way, it is yet another filtering API, so it must be totally reworked. > > Not quite understand. I only try to change the name. If rework needed, could we do this with a new patch? I know you are trying to improve the situation :) I'm just saying that the whole filtering APIs suck and we need to re-think it. But it's another discussion. Let's improve this one for 16.04 while talking about future design in other threads. > > > As it may be an ABI change if change the names directly, the new > > > functions are added but not remove the old ones. The old ones will be > > > removed in the next release after an ABI change announcement. > > > > Please make the announce in this patch. > > Sure, I'll do that. Thanks > > > --- a/lib/librte_ether/rte_ethdev.h > > > +++ b/lib/librte_ether/rte_ethdev.h > > > @@ -3403,6 +3415,9 @@ rte_eth_dev_rss_hash_conf_get(uint8_t port_id, > > > int rte_eth_dev_udp_tunnel_add(uint8_t port_id, > > > struct rte_eth_udp_tunnel *tunnel_udp); > > > > You must deprecate this one and put a comment above with something like > > @see rte_eth_dev_udp_tunnel_port_add. > I'll add this. Thanks. > > > > > > +int > > > +rte_eth_dev_udp_tunnel_port_add(uint8_t port_id, > > > + struct rte_eth_udp_tunnel *tunnel_udp); > > > > You must move it below the doxygen comment. > OK. Honestly, I'd like to act like that. But seems the style is to put the function above the comment.(Don't know the reason.) Do you mean the function below the comment? > It'll be a little strange if I do something different. Just check the doxygen output. We must have the comments associated with the new function and a deprecation comment with the old one. > > > --- a/lib/librte_ether/rte_ether_version.map > > > +++ b/lib/librte_ether/rte_ether_version.map > > > @@ -114,6 +114,8 @@ DPDK_2.2 { > > > rte_eth_tx_queue_setup; > > > rte_eth_xstats_get; > > > rte_eth_xstats_reset; > > > + rte_eth_dev_udp_tunnel_port_add; > > > + rte_eth_dev_udp_tunnel_port_delete; > > > > > > local: *; > > > }; > > > > Panu already made a comment about adding a new section for 16.04. > > Thanks for the info. Let me follow it.