blob: d013b6a68503da6d36a7e5ee603e819f31d38dc9 [file] [log] [blame]
Xinyao Cai648006b2023-05-09 21:23:39 +08001From baa172f1a9e370a0549a31840c3cd148046d1d84 Mon Sep 17 00:00:00 2001
2From: Xinyao Cai <xinyao.cai@intel.com>
3Date: Tue, 18 Apr 2023 16:37:17 +0800
4Subject: [PATCH] allow the use of -a and -b flag the same time in EAL
5 parameters.
6
7---
8 lib/eal/common/eal_common_options.c | 14 --------------
9 1 file changed, 14 deletions(-)
10
11diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
12index 0305933698..0d8f9c5a38 100644
13--- a/lib/eal/common/eal_common_options.c
14+++ b/lib/eal/common/eal_common_options.c
15@@ -1623,24 +1623,15 @@ int
16 eal_parse_common_option(int opt, const char *optarg,
17 struct internal_config *conf)
18 {
19- static int b_used;
20- static int a_used;
21-
22 switch (opt) {
23 case 'b':
24- if (a_used)
25- goto ba_conflict;
26 if (eal_option_device_add(RTE_DEVTYPE_BLOCKED, optarg) < 0)
27 return -1;
28- b_used = 1;
29 break;
30
31 case 'a':
32- if (b_used)
33- goto ba_conflict;
34 if (eal_option_device_add(RTE_DEVTYPE_ALLOWED, optarg) < 0)
35 return -1;
36- a_used = 1;
37 break;
38 /* coremask */
39 case 'c': {
40@@ -1929,11 +1920,6 @@ eal_parse_common_option(int opt, const char *optarg,
41 }
42
43 return 0;
44-
45-ba_conflict:
46- RTE_LOG(ERR, EAL,
47- "Options allow (-a) and block (-b) can't be used at the same time\n");
48- return -1;
49 }
50
51 static void
52--
532.34.1
54