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 6618DA0562; Tue, 31 Mar 2020 19:07:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 42AF21BFD9; Tue, 31 Mar 2020 19:07:23 +0200 (CEST) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id 4BB4E1BFC5 for ; Tue, 31 Mar 2020 19:07:21 +0200 (CEST) Received: by mail-pl1-f196.google.com with SMTP id g2so8351278plo.3 for ; Tue, 31 Mar 2020 10:07:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=NDLtdw+FNEr0PNr715leLt3fRQnGuHjWh3XLa62mqk0=; b=WJO6z5FNuIk+Ylf4FNwrDzaxpxiIbuISPldDRX7XdwucKNPfoxjH4GUjSq4UvWcb+C jV99eSGFhSlg9J1hBr6YRhLzkP0rmhgmBEP1jl+K0PXv112fixTCDk3Eb4mkxGsGoBhW XvkGdQSunvHXR1P5wpmVZ598JDZIKpFwIydCgA5fbtj+r2DjfG3viac6B+l29iX/2bSk 5iSprhcHaSJXHbjKy4g4SgWuXR88yblGTLlmnTDbvrDSe5PepldJjk1Kr9FmUlL7swgb GEzd1N1ECdLyq8Yk52UPc7P8eOq5x6iYWl8GZRi1ao8EFoscqgNbNoEGXhRWb7/AFbpf 9oaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=NDLtdw+FNEr0PNr715leLt3fRQnGuHjWh3XLa62mqk0=; b=bIu7o5KQ/rOSEkd8ubDgSpRMDjt7f582TU5XP/V68Yih6kC1aM99s4r0sVJ7Cdu5w2 av5e+tjjd/Ib1qSMoVohYPWSeTMGIVMq59/r0OGj0nTx4PG1V74eMU2PXqp88ei/8vBt baFOSZTip/yP+Rr8n+Y9oRNVRcSb2ke5Yz6LsVkWCwD5nsR0ZhvJST0GStDTURxCSA5I 8shKrAGkpGsKbJammJYj9iP8nICH5t0E8s9ROlb1ivsL2ECvkOr7pWVNZkWAWRPAUIxu 1noeIKTnkhgqPYnkP+g2MzGIfnwhHgDlzkK6xA9E/tcDOk6z4ntX7/2amrfiMw6tb230 lsYA== X-Gm-Message-State: AGi0PuZwTcaXrGrWjofVXLpCAABvB9h3+EKmkTamvgBI+0y2AM236WDm xqW1jvm16CocAyO/vyomzrcBesKw6S66rQ== X-Google-Smtp-Source: APiQypJKZEcDUzsWSVCW+1sm10nUdCncRBoMtJ3FzldqvV5Rv27IostfpS6LR08EiE8PJwEFpl/V7Q== X-Received: by 2002:a17:90b:3009:: with SMTP id hg9mr5188458pjb.108.1585674440167; Tue, 31 Mar 2020 10:07:20 -0700 (PDT) Received: from [10.95.131.153] ([199.233.58.37]) by smtp.gmail.com with ESMTPSA id c9sm2345108pjr.47.2020.03.31.10.07.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 Mar 2020 10:07:19 -0700 (PDT) To: dev@dpdk.org References: <20200326064216.5676-1-pbhagavatula@marvell.com> <20200331125315.2521-1-pbhagavatula@marvell.com> From: Andrzej Ostruszka Message-ID: <8becda5f-9d4b-f4b4-9147-fa22fcacf497@semihalf.com> Date: Tue, 31 Mar 2020 19:07:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200331125315.2521-1-pbhagavatula@marvell.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3] examples/l2fwd-event: add option to configure port pairs 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 3/31/20 2:53 PM, pbhagavatula@marvell.com wrote: > From: Pavan Nikhilesh > > Current l2fwd-event application statically configures adjacent ports as > destination ports for forwarding the traffic. > > Add a config option to pass the forwarding port pair mapping which allows > the user to configure forwarding port mapping. > > If no config argument is specified, destination port map is not > changed and traffic gets forwarded with existing mapping. > > To align port/queue configuration of each lcore with destination port > map, port/queue configuration of each lcore gets modified when config > option is specificed. > > Ex: ./l2fwd-event -c 0xff -- -p 0x3f -q 2 --config="(0,3)(1,4)(2,5)" > > With above config option, traffic received from portid = 0 gets forwarded > to port = 3 and vice versa, similarly traffic gets forwarded on other port > pairs (1,4) and (2,5). > > Signed-off-by: Pavan Nikhilesh > --- > v3 Changes: > - Use simple memcpy instead of snprintf. (Andrzej) > - Skip redudant loop iterations. (Andrzej) > - Use RTE_MAX_ETHPORTS instead of hardcoding to 255. (Andrzej) > > v2 Changes: > - Fix minor formatting error. > - Change uint8_t to bool. Reviewed-by: Andrzej Ostruszka