From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ustc.edu.cn (smtp2.ustc.edu.cn [202.38.64.46]) by dpdk.org (Postfix) with ESMTP id 9693D91DC for ; Wed, 21 Oct 2015 08:17:22 +0200 (CEST) Received: from dell (unknown [222.195.92.204]) by newmailweb.ustc.edu.cn (Coremail) with SMTP id LkAmygA3NfnqLSdWcqfrAQ--.1182S2; Wed, 21 Oct 2015 14:17:19 +0800 (CST) Date: Wed, 21 Oct 2015 14:17:18 +0800 From: Tiwei Bie To: David Marchand Message-ID: <20151021061718.GA68563@dell> References: <1444909564-53691-1-git-send-email-btw@mail.ustc.edu.cn> <1445260390-78613-1-git-send-email-btw@mail.ustc.edu.cn> <20151019131617.GB13556@bricha3-MOBL3> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-CM-TRANSID: LkAmygA3NfnqLSdWcqfrAQ--.1182S2 X-Coremail-Antispam: 1UD129KBjvdXoW7Gw1xXr1ktF4kXw18XryrZwb_yoWkZrc_uF 40ywnrCrZY9F42kFna9F1fA398Ca92yry5Ww42934kJ3Z7KF4fJFWkC3Wktr9rtrs7ur9r uFyIqFZ8KrnxXjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb7xYjsxI4VWxJwAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I 8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI 64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r106r15McIj6I8E87Iv67AKxVWUJVW8Jw Am72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc2xSY4AK67AK6r47MxAIw28IcxkI 7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxV Cjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY 6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6x AIw20EY4v20xvaj40_WFyUJVCq3wCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv 6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07jotC7UUUUU= X-CM-SenderInfo: xewzqzxdloh3xvwfhvlgxou0/1tbiAQYJAVQhmEryOAAEsm Cc: "dev@dpdk.org" , dprovan@bivio.net Subject: Re: [dpdk-dev] [PATCH v2] eal: don't reset getopt lib X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Oct 2015 06:17:23 -0000 On Wed, Oct 21, 2015 at 07:33:42AM +0200, David Marchand wrote: > On Mon, Oct 19, 2015 at 3:16 PM, Bruce Richardson > wrote: > > > On Mon, Oct 19, 2015 at 09:13:10PM +0800, Tiwei Bie wrote: > > > Someone may need to call rte_eal_init() with a fake argc/argv array > > > in the middle of using getopt() to parse its own unrelated argc/argv > > > parameters. So getopt lib shouldn't be reset by rte_eal_init(). > > > > > > Now eal will always save optind, optarg and optopt (and optreset on > > > FreeBSD) at the beginning, initialize optind (and optreset on FreeBSD) > > > to 1 before calling getopt_long(), then restore all values after. > > > > > > Suggested-by: Don Provan > > > Suggested-by: Bruce Richardson > > > Signed-off-by: Tiwei Bie > > > Reviewed-by: Don Provan > > > Reviewed-by: Bruce Richardson > > > > Acked-by: Bruce Richardson > > > > Acked-by: David Marchand > > Thanks Tiwei. > My pleasure. Thanks! :-) Best regards, Tiwei Bie