Message ID | 20230705172954.906085-1-kai.ji@intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | akhil goyal |
Headers | |
Series | [v1] examples/ipsec-secgw: fix of socket id default value | |
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/loongarch-compilation | success | Compilation OK |
ci/loongarch-unit-testing | success | Unit Testing PASS |
ci/Intel-compilation | success | Compilation OK |
ci/intel-Testing | success | Testing PASS |
ci/github-robot: build | success | github build: passed |
ci/intel-Functional | success | Functional PASS |
ci/iol-mellanox-Performance | success | Performance Testing PASS |
ci/iol-abi-testing | success | Testing PASS |
ci/iol-aarch-unit-testing | success | Testing PASS |
ci/iol-unit-testing | success | Testing PASS |
ci/iol-x86_64-compile-testing | success | Testing PASS |
ci/iol-intel-Performance | success | Performance Testing PASS |
ci/iol-broadcom-Performance | success | Performance Testing PASS |
ci/iol-aarch64-compile-testing | success | Testing PASS |
ci/iol-broadcom-Functional | success | Functional Testing PASS |
ci/iol-intel-Functional | success | Functional Testing PASS |
ci/iol-testing | success | Testing PASS |
ci/iol-x86_64-unit-testing | success | Testing PASS |
Commit Message
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index 029749e522..e678625ece 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -1699,6 +1699,11 @@ cryptodevs_init(enum eh_pkt_transfer_mode mode) total_nb_qps += qp; dev_conf.socket_id = rte_cryptodev_socket_id(cdev_id); + /* range check the socket_id - negative values become big + * positive ones due to use of unsigned value + */ + if (dev_conf.socket_id >= RTE_MAX_NUMA_NODES) + dev_conf.socket_id = 0; dev_conf.nb_queue_pairs = qp; dev_conf.ff_disable = RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO;