From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0A25AA0613 for ; Thu, 26 Sep 2019 19:33:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CE0962C38; Thu, 26 Sep 2019 19:33:21 +0200 (CEST) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by dpdk.org (Postfix) with ESMTP id 373962C36 for ; Thu, 26 Sep 2019 19:33:20 +0200 (CEST) Received: by mail-io1-f66.google.com with SMTP id c6so8571222ioo.13 for ; Thu, 26 Sep 2019 10:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0w3sfgKENA7Y0yatISWigJEYAduG5Z9W0hgUAfVFam4=; b=KeIPwZH6b6byrMWiqwsUxztKR5MFa71xEtB2IhX3zcX8xQFwgLgchVZ7qCbzNu7USu moMNxt2mHano3WDfoF2uze/uME9DpX/ag3NGs5Q6yeo5p1XSR0p13KYeT6fo1KW1u+tu 2grkU/t8112msc7ZevGfetdab1Vi53q6OImFxYzXIuu1e4CxDK/CKsFjEzvw9Qq07EH3 u292HzEEQIwc2JgrM4ndtARmC/B9o8CQDWBWrdtXuHWI+hhDXN3p3quA/QeIfj2d2vkp f3uI5rVtpTGR+X9eH1y3VdM5gkNC9JzaGEviWDykCMt2SLQF+WPBxKfeMurI21IEh3yk V09g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0w3sfgKENA7Y0yatISWigJEYAduG5Z9W0hgUAfVFam4=; b=XZoJ8jL2XLPDBJCqznyuErsAD8K5xyD9v73QbdSq9z9CYADvuWu+3YXtXlSZ4ddQ5s 3saTS3lXuSuckT14cMxymoXErNXc2lrQRYqNnjoDUVoGeQj0retD9xtljZQyCvrAH7aH I8os+CcVYlYsNXOUtcw/+FdntXGIiyCJGMaalhXE+IjD9wuzNyi/PS6XtVE26nVd6CuQ UbNJI9YcaeaW0tD9+kLoa+fusaBPvq++xAGzrl/hw9I/nIeF7CZjP07BgBV28CZ6Hlds eH8lii3jNrU0tKf1H0LDJPn4gwAYMIOIKKOlx4y69xhCaaycAdozBvvmGgWbIjfVqE1w IA9A== X-Gm-Message-State: APjAAAWECl5kDMFKoCe1AjS2/bkmC5kx1FufYzynjQM9uiz8KuErQ16o qLI9K0j7zs6pmZ4ZDIJ4DJeFilqNfzlekM05+Lg= X-Google-Smtp-Source: APXvYqyjFNZObfi5JQp+H1M6cI7e3CTcyXt4lK7R+7+fJ3tI8vGhLsn4OvTBlq+MZ3UqAiAanGt3rGdQz9O7T2sMjLg= X-Received: by 2002:a92:de42:: with SMTP id e2mr3706951ilr.271.1569519199436; Thu, 26 Sep 2019 10:33:19 -0700 (PDT) MIME-Version: 1.0 References: <20190919101346.8832-1-pbhagavatula@marvell.com> <20190924094209.3827-1-pbhagavatula@marvell.com> <20190924094209.3827-3-pbhagavatula@marvell.com> In-Reply-To: <20190924094209.3827-3-pbhagavatula@marvell.com> From: Jerin Jacob Date: Thu, 26 Sep 2019 23:03:08 +0530 Message-ID: To: Pavan Nikhilesh Cc: Jerin Jacob , "Richardson, Bruce" , akhil.goyal@nxp.com, Marko Kovacevic , Ori Kam , Radu Nicolau , Tomasz Kantecki , Sunil Kumar Kori , dpdk-dev Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v4 02/10] examples/l2fwd-event: add infra for eventdev X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Sep 24, 2019 at 3:12 PM wrote: > > From: Sunil Kumar Kori > > Add infra to select event device as a mode to process packets through > command line arguments. Also, allow the user to select the schedule type > to be either RTE_SCHED_TYPE_ORDERED or RTE_SCHED_TYPE_ATOMIC. > > Usage: > > `--mode="eventdev"` or `--mode="poll"` > `--eventq-sync="ordered"` or `--eventq-sync="atomic"` > > Signed-off-by: Sunil Kumar Kori > --- > main(int argc, char **argv) > { > + struct eventdev_resources *eventdev_rsrc; > uint16_t nb_ports_available = 0; > struct lcore_queue_conf *qconf; > uint32_t nb_ports_in_mask = 0; > @@ -524,6 +548,7 @@ main(int argc, char **argv) > signal(SIGINT, signal_handler); > signal(SIGTERM, signal_handler); > > + eventdev_rsrc = get_eventdev_rsrc(); > /* parse application arguments (after the EAL ones) */ > ret = l2fwd_parse_args(argc, argv); > if (ret < 0) > @@ -584,6 +609,17 @@ main(int argc, char **argv) > if (l2fwd_pktmbuf_pool == NULL) > rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n"); > > + eventdev_rsrc->port_mask = l2fwd_enabled_port_mask; > + eventdev_rsrc->pkt_pool = l2fwd_pktmbuf_pool; > + eventdev_rsrc->dst_ports = l2fwd_dst_ports; > + eventdev_rsrc->timer_period = timer_period; > + eventdev_rsrc->mac_updt = mac_updating; > + eventdev_rsrc->stats = port_statistics; > + eventdev_rsrc->done = &force_quit; These resources are repeating for poll mode as well. IMO, We can have "rsrc" object which will have variables required for this application.(i.e poll and event mode) to avoid code duplication.