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 9B6C75961 for ; Mon, 19 Oct 2015 15:15:14 +0200 (CEST) Received: from dell (unknown [222.195.92.204]) by newmailweb.ustc.edu.cn (Coremail) with SMTP id LkAmygAHuQnZ7CRW4LPbAQ--.64740S2; Mon, 19 Oct 2015 21:15:12 +0800 (CST) Date: Mon, 19 Oct 2015 21:15:08 +0800 From: Tiwei Bie To: Bruce Richardson Message-ID: <20151019131508.GA3867@dell> References: <1444909564-53691-1-git-send-email-btw@mail.ustc.edu.cn> <20151019103641.GA13936@bricha3-MOBL3> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20151019103641.GA13936@bricha3-MOBL3> User-Agent: Mutt/1.5.24 (2015-08-30) X-CM-TRANSID: LkAmygAHuQnZ7CRW4LPbAQ--.64740S2 X-Coremail-Antispam: 1UD129KBjvdXoW7Xr4DJr45CF47Gw15Jw15CFg_yoWxCrg_uF 1xAwn7Cw1v9FWDCa18Kr1fJrW7W3yDZr1UXFs3u397tFykGa1rJr95urn7XF1UKF1xWryD WF42q3yaqr45WjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb78YjsxI4VW3JwAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I 8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI 64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVW8JVWxJw Am72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc2xSY4AK67AK6ry8MxAIw28IcxkI 7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxV Cjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUXVWUAwCIc40Y0x0EwIxGrwCI42IY 6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6x AIw20EY4v20xvaj40_Zr0_Wr1UMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIE c7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU0mYLDUUUUU== X-CM-SenderInfo: xewzqzxdloh3xvwfhvlgxou0/1tbiAQcHAVQhmEobywAOs5 Cc: dev@dpdk.org, dprovan@bivio.net Subject: Re: [dpdk-dev] [PATCH] 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: Mon, 19 Oct 2015 13:15:15 -0000 On Mon, Oct 19, 2015 at 11:36:41AM +0100, Bruce Richardson wrote: > On Thu, Oct 15, 2015 at 07:46:04PM +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. > > This patch looks good overall. Minor comment inline below. > Thanks for review! :-) Best regards, Tiwei Bie