Skip to contentSkip to conversation

l2fwd-crypto: skip dev configure for masked devices

PATCH Superseded Hemant Agrawal 2 participants 4 messages Feb 23, 2021 – Apr 13, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 l2fwd-crypto: skip dev configure for masked devices

From: Apeksha Gupta <[email protected]>

The devices which are masked by cryptodev mask should not be initialized and skipped while traversing the device list.

---
 examples/l2fwd-crypto/main.c | 6 ++++++
 1 file changed, 6 insertions(+)
examples/l2fwd-crypto/main.c +6 -0
index e7a1eea30..656b14036 100644
@@ -2265,6 +2265,12 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 		if (enabled_cdevs[cdev_id] == 0)
 			continue;
 
+		if (check_cryptodev_mask(options, cdev_id) < 0)
+			continue;
+
+		if (check_capabilities(options, cdev_id) < 0)
+			continue;
+
 		retval = rte_cryptodev_socket_id(cdev_id);
 
 		if (retval < 0) {
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 l2fwd-crypto: skip dev configure for masked devices

The devices which are masked by cryptodev mask should not be initialized and skipped while traversing the device list.

---
 examples/l2fwd-crypto/main.c | 6 ++++++
 1 file changed, 6 insertions(+)

again a fixes tag is missing.
title should be
examples/l2fwd-crypto: fix dev configure for masked devices

#2 lore raw

PATCH v2 1/1 l2fwd-crypto: fix dev configure for masked devices

In reply to Hemant Agrawal

From: Apeksha Gupta <[email protected]>

The devices which are masked by cryptodev mask should not be initialized and skipped while traversing the device list.

Fixes 6ae3fb9df66e ("examples/l2fwd-crypto: fix session mempool size")
---
 examples/l2fwd-crypto/main.c | 6 ++++++
 1 file changed, 6 insertions(+)
examples/l2fwd-crypto/main.c +6 -0
index 0ee3e1470a..1016ceb841 100644
@@ -2251,6 +2251,12 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 		if (enabled_cdevs[cdev_id] == 0)
 			continue;
 
+		if (check_cryptodev_mask(options, cdev_id) < 0)
+			continue;
+
+		if (check_capabilities(options, cdev_id) < 0)
+			continue;
+
 		retval = rte_cryptodev_socket_id(cdev_id);
 
 		if (retval < 0) {
Signature · 1 line
2.17.1
Acked-by on v2 1/1 Applied
#3 lore raw

Re: [dpdk-dev] [EXT] [PATCH v2] l2fwd-crypto: fix dev configure for masked devices

Quoted 10 lines

From: Apeksha Gupta <[email protected]>

The devices which are masked by cryptodev mask should not be initialized and skipped while traversing the device list.

Fixes 6ae3fb9df66e ("examples/l2fwd-crypto: fix session mempool size")

---

Applied to dpdk-next-crypto

Thanks.