dpdk: code preparation for bumping to DPDK 22.11
[vpp.git] / build / external / patches / dpdk_22.11.1 / 0001-allow-the-use-of-ab-flag-the-same-time-in-EAL.patch
1 From baa172f1a9e370a0549a31840c3cd148046d1d84 Mon Sep 17 00:00:00 2001
2 From: Xinyao Cai <xinyao.cai@intel.com>
3 Date: Tue, 18 Apr 2023 16:37:17 +0800
4 Subject: [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
11 diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
12 index 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 -- 
53 2.34.1
54