[dpdk-dev,v4] ethdev: fix port id storage

Message ID 20180309112748.292704-1-ferruh.yigit@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ferruh Yigit March 9, 2018, 11:27 a.m. UTC
  port_id is now 16bits, update function parameter according.

Fixes: 4c270218aa26 ("ethdev: support security APIs")
Cc: stable@dpdk.org
Cc: declan.doherty@intel.com

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
Cc: Boris Pismenny <borisp@mellanox.com>
Cc: Aviad Yehezkel <aviadye@mellanox.com>
Cc: Radu Nicolau <radu.nicolau@intel.com>
Cc: Declan Doherty <declan.doherty@intel.com>

v4:
* Remove deprecation notice. LIBABIVER already incread in this release.
---
 doc/guides/rel_notes/deprecation.rst | 4 ----
 lib/librte_ether/rte_ethdev.c        | 2 +-
 lib/librte_ether/rte_ethdev.h        | 2 +-
 3 files changed, 2 insertions(+), 6 deletions(-)
  

Comments

Thomas Monjalon March 9, 2018, 12:58 p.m. UTC | #1
09/03/2018 12:27, Ferruh Yigit:
> port_id is now 16bits, update function parameter according.
> 
> Fixes: 4c270218aa26 ("ethdev: support security APIs")
> Cc: stable@dpdk.org
> Cc: declan.doherty@intel.com
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

Acked-by: Thomas Monjalon <thomas@monjalon.net>
  
Ferruh Yigit March 26, 2018, 8:25 p.m. UTC | #2
On 3/9/2018 12:58 PM, Thomas Monjalon wrote:
> 09/03/2018 12:27, Ferruh Yigit:
>> port_id is now 16bits, update function parameter according.
>>
>> Fixes: 4c270218aa26 ("ethdev: support security APIs")
>> Cc: stable@dpdk.org
>> Cc: declan.doherty@intel.com
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> 
> Acked-by: Thomas Monjalon <thomas@monjalon.net>

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 659458587..ad54de721 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -149,10 +149,6 @@  Deprecation Notices
   as parameter. For consistency functions adding callback will return
   ``struct rte_eth_rxtx_callback \*`` instead of ``void \*``.
 
-* ethdev: ``rte_eth_dev_get_sec_ctx()`` fix port id storage
-  ``rte_eth_dev_get_sec_ctx()`` is using ``uint8_t`` for ``port_id``,
-  which should be ``uint16_t``.
-
 * i40e: The default flexible payload configuration which extracts the first 16
   bytes of the payload for RSS will be deprecated starting from 18.02. If
   required the previous behavior can be configured using existing flow
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 6d6874903..86bce0872 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -520,7 +520,7 @@  rte_eth_dev_socket_id(uint16_t port_id)
 }
 
 void *
-rte_eth_dev_get_sec_ctx(uint8_t port_id)
+rte_eth_dev_get_sec_ctx(uint16_t port_id)
 {
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, NULL);
 	return rte_eth_devices[port_id].security_ctx;
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 036153306..213fe27e1 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -3530,7 +3530,7 @@  rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool);
  *   - pointer to security context on success.
  */
 void *
-rte_eth_dev_get_sec_ctx(uint8_t port_id);
+rte_eth_dev_get_sec_ctx(uint16_t port_id);
 
 
 #include <rte_ethdev_core.h>