From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 0/6] Extensions to test-pmd Date: Mon, 19 May 2014 11:31:34 +0200 Message-ID: <15561928.x5QfvWktoO@xps13> References: <1396546216-29200-1-git-send-email-cchemparathy@tilera.com> <2296399.R20Tya40om@xps13> <5376430A.8010707@tilera.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Cyril Chemparathy Return-path: In-Reply-To: <5376430A.8010707-kv+TWInifGbQT0dZR+AlfA@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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