From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932240AbdJJNMn (ORCPT ); Tue, 10 Oct 2017 09:12:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60410 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932212AbdJJNMk (ORCPT ); Tue, 10 Oct 2017 09:12:40 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EE14E4ACBA Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=brouer@redhat.com Date: Tue, 10 Oct 2017 15:12:31 +0200 From: Jesper Dangaard Brouer To: Christina Jacob Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sunil.Goutham@cavium.com, daniel@iogearbox.net, dsahern@gmail.com, Christina Jacob , brouer@redhat.com Subject: Re: [PATCH v2] XDP Program for Ip forward Message-ID: <20171010151231.69fde82f@redhat.com> In-Reply-To: <1507620532-25804-1-git-send-email-Christina.Jacob@cavium.com> References: <1507620532-25804-1-git-send-email-Christina.Jacob@cavium.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 10 Oct 2017 13:12:40 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 Oct 2017 12:58:51 +0530 Christina Jacob wrote: > The patch below implements port to port forwarding through route table and arp > table lookup for ipv4 packets using bpf_redirect helper function and lpm_trie > map. This has an improved performance over the normal kernel stack ip forward. > > Implementation details. > ----------------------- [...] > > In the xdp3_user.c, > [...] > > In the xdp3_kern.c, You forgot to update the program name in the cover letter. > The array map for the 32 bit mask entries checked to see if there is a key that > exactly matches with the destination ip. If it has a non zero destination mac > entry then the xdp data is updated accordingly Otherwise a proper route and > arp table lookup is done using the lpm_trie and the arp table array map. > > Usage: as ./xdp3 -S (-S for ^^^^^ The executable name also changed. > generic xdp implementation ifindex- the index of the interface to which > the xdp program has to be attached.) in 4.14-rc3 kernel. > > Changes from v1 to v2 > --------------------- > > * As suggested by Jesper Dangaard Brouer > 1. Changed the program name to list xdp_router_ipv4 Thanks > 2. Changed the commandline arguments from ifindex list to interface name > Usage : ./xdp_router_ipv4 [-S] > -S for generic xdp implementation > -interface name list is the list of interfaces to which > the xdp program should attach to Okay, you choose a slightly different way of implementing this, but it shouldn't matter. I'll try to test/benchmark your program... -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer