[v6,05/21] flow_classify: do not check for invalid socket ID

Message ID 69be3f4a34896c5d35d736e4cd82aaa2f0b24b16.1538044725.git.anatoly.burakov@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Support externally allocated memory in DPDK |

Checks

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

Commit Message

Anatoly Burakov Sept. 27, 2018, 10:41 a.m. UTC
  We will be assigning "invalid" socket ID's to external heap, and
malloc will now be able to verify if a supplied socket ID is in
fact a valid one, rendering parameter checks for sockets
obsolete.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_flow_classify/rte_flow_classify.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Comments

Iremonger, Bernard Sept. 27, 2018, 4:14 p.m. UTC | #1
> -----Original Message-----
> From: Burakov, Anatoly
> Sent: Thursday, September 27, 2018 11:41 AM
> To: dev@dpdk.org
> Cc: Iremonger, Bernard <bernard.iremonger@intel.com>;
> laszlo.madarassy@ericsson.com; laszlo.vadkerti@ericsson.com;
> andras.kovacs@ericsson.com; winnie.tian@ericsson.com;
> daniel.andrasi@ericsson.com; janos.kobor@ericsson.com;
> geza.koblo@ericsson.com; srinath.mannam@broadcom.com;
> scott.branden@broadcom.com; ajit.khaparde@broadcom.com; Wiles, Keith
> <keith.wiles@intel.com>; Richardson, Bruce <bruce.richardson@intel.com>;
> thomas@monjalon.net; shreyansh.jain@nxp.com; shahafs@mellanox.com;
> arybchenko@solarflare.com; alejandro.lucero@netronome.com
> Subject: [PATCH v6 05/21] flow_classify: do not check for invalid socket ID
> 
> We will be assigning "invalid" socket ID's to external heap, and malloc will now
> be able to verify if a supplied socket ID is in fact a valid one, rendering
> parameter checks for sockets obsolete.
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>

Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
  

Patch

diff --git a/lib/librte_flow_classify/rte_flow_classify.c b/lib/librte_flow_classify/rte_flow_classify.c
index 4c3469da1..fb652a2b7 100644
--- a/lib/librte_flow_classify/rte_flow_classify.c
+++ b/lib/librte_flow_classify/rte_flow_classify.c
@@ -247,8 +247,7 @@  rte_flow_classifier_check_params(struct rte_flow_classifier_params *params)
 	}
 
 	/* socket */
-	if ((params->socket_id < 0) ||
-	    (params->socket_id >= RTE_MAX_NUMA_NODES)) {
+	if (params->socket_id < 0) {
 		RTE_FLOW_CLASSIFY_LOG(ERR,
 			"%s: Incorrect value for parameter socket_id\n",
 			__func__);