From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f171.google.com (mail-we0-f171.google.com [74.125.82.171]) by dpdk.org (Postfix) with ESMTP id 3132158E0 for ; Mon, 19 May 2014 11:31:28 +0200 (CEST) Received: by mail-we0-f171.google.com with SMTP id w62so5258749wes.16 for ; Mon, 19 May 2014 02:31:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=ASnDcZgaXbAgzITt01zA98nYgzFh9nR4XDknFjLiYHQ=; b=GlqtceMCiQcHjWtCxA8nPa24dS0PScXdxJLEkMcH/of8icQRWc9rd1uUQ+Kl7OQlRe mnfYC3pkJgE8fFITfkUQT6X4GJYHJ4famAgkTlLUxvCFW3NehxanpHFDDcy99QRv3BDB pf3r4u6eKyBsaSZQMWkldGNe2wYC2uz+huPKkzsgSoNFecRV3uilC3Qne4oO21zf/tm4 o9DRZj/yOumVv37vQSiZ0N4YGd01/wCSjPRYyjTnYjLFYmWrXlAxEGxz2+KuRuD1P7Jd T3U9bJjyR1799rGJoYgXQBp92OGEaLgLC8T86eUyEFrBGQclPvVUwzc4PjZy7361k4jH iJeQ== X-Gm-Message-State: ALoCoQk0rgsBgv+EvDcgxGRefWbMSA1IscjKeG42mtJOl3etbmLyHcfGzRjWy3xmgUNsQNxG5fXj X-Received: by 10.194.5.5 with SMTP id o5mr28339588wjo.16.1400491896866; Mon, 19 May 2014 02:31:36 -0700 (PDT) Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id l4sm14087512wiy.0.2014.05.19.02.31.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 May 2014 02:31:35 -0700 (PDT) From: Thomas Monjalon To: Cyril Chemparathy Date: Mon, 19 May 2014 11:31:34 +0200 Message-ID: <15561928.x5QfvWktoO@xps13> Organization: 6WIND User-Agent: KMail/4.13 (Linux/3.14.4-1-ARCH; KDE/4.13.0; x86_64; ; ) In-Reply-To: <5376430A.8010707@tilera.com> References: <1396546216-29200-1-git-send-email-cchemparathy@tilera.com> <2296399.R20Tya40om@xps13> <5376430A.8010707@tilera.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 0/6] Extensions to test-pmd 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 May 2014 09:31:28 -0000 2014-05-16 09:55, Cyril Chemparathy: > On 5/16/2014 7:22 AM, Thomas Monjalon wrote: > > This is not the first time a new engine is added by copy/pasting the most > > part of an existing engine. For instance, the "mac-retry" engine was > > added by Intel as a copy/paste of the original "mac" one. > > This is acceptable but not the perfect way to implement engines. > > To address this issue, a new engine function could be introduced to setup > > some parameters to be used by "packet_fwd" function. This way, similar > > engines could be removed. > > Agreed that it sucks to incessantly replicate code. Maybe some of the > packet_fwd code is common enough to bump into run_pkt_fwd_on_lcore()? > Most of these forwarding modes have similar looking code to > receive/transmit bursts and free the failed remnants of the burst. > Could this common code be bumped up into run_pkt_fwd_on_lcore() maybe? Not sure it fits into run_pkt_fwd_on_lcore() for all engines. Feel free to suggest patches :) -- Thomas