Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp210377yba; Wed, 17 Apr 2019 23:13:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxacSy8/tx5ZEL8qrQYzgkoYf0tslFNqo9LmfxykSOU2l6hgGHXJF/5929wPWH54WX1PU8A X-Received: by 2002:a62:1795:: with SMTP id 143mr95403394pfx.104.1555568008171; Wed, 17 Apr 2019 23:13:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555568008; cv=none; d=google.com; s=arc-20160816; b=fnluRPdJIQncEpcD95Zy3F3bURhEL+PCBjtubYh23AkfpMnbEVWuji/j4aqiIor0Mf JfA8/pwbOEiU6m6cHx39YMSGmFJ2bRo7Jg1xA2NNjy0G7w+C4QQatB+2Cm5/9XRwcOba 6pHwtB+gPrXLCO7DzZ8iTTQO4pcboZb/5KmcArGOALjTDfKQa3vfl6T8QiL2SghMbxlZ VX+mOaJ5DRzBrRUB5l6lVXL8Fnv61OC4HYpfkXjKrUuZ8RA6EOIIU2xdE+0OHmcoPJSp Ef/dx09AyKWaoYNgpVxV5WNG0/jkHmwIs1AbrC5rFR0fVykZUvF6ZmeW8SaXU1Lzi9eY sgIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Lz7yWPtSXVpxhOY8cfs/80Rx7F34AkV4n5jke7TRbt8=; b=ZKj/c465RUe+5bOnY5il/3Sj6HuzwGsDt/UyqZJr2QfqvLCrY/cUiQzUjMTlmhsXWf TL+MXFbyjIGWBKSliTo/3PUu1TtLANa2Mu8liBVpjq5Qbfh/0KtweWfWLjMRjp2/RNxd OiyQYl+RcEmVaqekp1HBQ5BBHqIqJ25qQEqTJn6nutC1oAC1pm69mHsL8gT3Lz/QtAzz p/kCq21LmtFevIIRGGCzjmZ4X6iNLCFP2UXKdIjK4kbnQEqO150QuxBNp3xolIrVdpTm BCnrdKGRXMGzJM5abObmrkeZsvDHt5QkF9CWrXl1z7T1SJXyApJfRdr7b+gymsn/RKjT 9qvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=h2TYWoAH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c11si1083826pga.462.2019.04.17.23.13.12; Wed, 17 Apr 2019 23:13:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=h2TYWoAH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387980AbfDRGMU (ORCPT + 99 others); Thu, 18 Apr 2019 02:12:20 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:33604 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725773AbfDRGMU (ORCPT ); Thu, 18 Apr 2019 02:12:20 -0400 Received: by mail-qt1-f193.google.com with SMTP id k14so1044828qtb.0; Wed, 17 Apr 2019 23:12:19 -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:content-transfer-encoding; bh=Lz7yWPtSXVpxhOY8cfs/80Rx7F34AkV4n5jke7TRbt8=; b=h2TYWoAHxO616ZQ2BdKSBzs4X9muR3zWIeuDAJIC0MPaax17S08JB5oCMcgXUmbhTe g1v6chhH7UT7iunt51gl6SkQFP+sQgQjrv8Yo7uQZuIktAzsYg7KX6wpofjkQFVQTPzv m45zix5UjD7h4lr8v5MPTXWJHr09uY40BaNMxP0PMW7eLce0QKFDwFc8wvBfB+evOMqa chSyNXildOXmpH3bdzpodAsxNs9aRY779vjfPiCP4dQm1YLnSCYinf735a6wlq9OQ/Hc HfM6SNePAp1xzdBFBS+CQ8brt1zLoBpR5WbtWLxbCRjF4icTJozy+KK7rpO+ucu6d98c aSLw== 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:content-transfer-encoding; bh=Lz7yWPtSXVpxhOY8cfs/80Rx7F34AkV4n5jke7TRbt8=; b=twQqYEHaA36Ryk/iBBWkpvhymAtZZCmfDWMuqVmAdo6Iqb8ZJeg7HTkrzXnBzWMB2G trgCN3IkCkqCnjIVqjLhdnz27SzHp7Cjd/lL3otralJgC9GMjZcUIXI0S0dj7ADio3/h wOh+kNROKeb5xE+4a4PbJyABvpugC1VbeeBblAeRNCDmItnGNVF2yt3cIDKi1KlmrN8w kVtiBVX4gRiVSWPdHKkJC+62YwpraTjma3s/MqKv6YRYgqD30ZaFBf/i1hSEU221LYS6 qbVIqDSG33ReJ5ZN6li37yCwWyo/famELEa4OGD8ziZ7908P/mzQRzURo+3/i4cOcXpw BRGg== X-Gm-Message-State: APjAAAXR2vYfZBEw9RmW4fX0KfUewH4KGG0ksSiyaFr8/5zQe1T/tM6f oXsRfbBegEol8JiIzZUys0yYm9RTql95mWfsNOU= X-Received: by 2002:ac8:950:: with SMTP id z16mr73716350qth.16.1555567938960; Wed, 17 Apr 2019 23:12:18 -0700 (PDT) MIME-Version: 1.0 References: <20190417174942.11811-1-ivan.khoronzhuk@linaro.org> In-Reply-To: <20190417174942.11811-1-ivan.khoronzhuk@linaro.org> From: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Date: Thu, 18 Apr 2019 08:12:06 +0200 Message-ID: Subject: Re: [RFC PATCH 0/3] net: ethernet: ti: cpsw: Add XDP support To: Ivan Khoronzhuk Cc: grygorii.strashko@ti.com, linux-omap@vger.kernel.org, LKML , Netdev , Ilias Apalodimas , hawk@kernel.org, Xdp , Alexei Starovoitov , aniel@iogearbox.net, Jakub Kicinski , John Fastabend , "Karlsson, Magnus" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 17 Apr 2019 at 19:51, Ivan Khoronzhuk wrote: > > This patchset is RFC adding XDP support for TI cpsw driver that is > based on page_pool allocator. It was verified with af_xdp sockets > and on xdp drop. For XDP redirect to another interface it's under > verification, still not sure about all cases that should be verified. > Also regular tests with iperf2 were done in order to verify impact on > regular netstack performance, compared with base commit from > net-next/master: 432bc230700f86801cffa5e159e05dea6229f722 > > It was verified with following configs enabled: > CONFIG_JIT=3Dy > CONFIG_BPFILTER=3Dy > CONFIG_BPF_SYSCALL=3Dy > CONFIG_XDP_SOCKETS=3Dy > CONFIG_BPF_EVENTS=3Dy > CONFIG_HAVE_EBPF_JIT=3Dy > CONFIG_BPF_JIT=3Dy > CONFIG_CGROUP_BPF=3Dy > > iperf2 UDP RX summary (packet size / Mbps): > +--------------------------------------------------------------+ > | pkt_size/rate | 1024 | 1500 | 1470 | 64 | 128 | 512 | 256 | > |---------------+------+------+------+------+------+-----+-----| > | base commit | 561 | 470 | 796 | 35 | 70.1 | 281 | 140 | > |---------------+------+------+------+------+------+-----+-----| > | XDP patched | 563 | 455 | 808 | 35 | 70.2 | 282 | 141 | > +--------------------------------------------------------------+ > > iperf2 UDP TX summary (packet size / Mbps): > +--------------------------------------------------------------+ > | pkt_size/rate | 1024 | 1500 | 1470 | 64 | 128 | 512 | 256 | > |---------------+------+------+------+------+------+-----+-----| > | base commit | 555 | 666 | 736 | 34.5 | 70.3 | 281 | 140 | > |---------------+------+------+------+------+------+-----+-----| > | XDP patched | 558 | 696 | 759 | 35.2 | 69.2 | 279 | 140 | > +--------------------------------------------------------------+ > > iperf2 TCP summary (window size / Mbps): > +------------------------------------------------------------+ > | window size/rate | 16 | 32 | 64 | 128 | 8 | 256 | > |------------------+------+------+------+------+------+------| > | base commit | 753 | 887 | 931 | 932 | 676 | 932 | > |------------------+------+------+------+------+------+------| > | XDP patched | 823 | 888 | 932 | 933 | 669 | 933 | > +------------------------------------------------------------+ > > For af_xdp socket type verification several generic changes should be add= ed > that can be seen here (rough fixes, for samples related seems like last v= ersion > of samples is more integrated with libbpf api, so should be rebased, > witch I will send as RFC separately): > https://github.com/ikhorn/af_xdp_stuff/tree/af_xdp_armv7 > More XDP support, yay! As for mmap/AF_XDP on 32-bit systems; Instead of hacking the if_xdp.h, mmap2 should be used. Have a look at the libbpf code here [1] Bj=C3=B6rn [1] https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/tree/t= ools/lib/bpf/xsk.c#n81 > Ivan Khoronzhuk (3): > net: ethernet: ti: davinci_cpdma: add dma mapped submit > net: ethernet: ti: davinci_cpdma: return handler status > net: ethernet: ti: cpsw: add XDP support > > drivers/net/ethernet/ti/Kconfig | 1 + > drivers/net/ethernet/ti/cpsw.c | 552 +++++++++++++++++++++--- > drivers/net/ethernet/ti/davinci_cpdma.c | 117 +++-- > drivers/net/ethernet/ti/davinci_cpdma.h | 6 +- > drivers/net/ethernet/ti/davinci_emac.c | 18 +- > 5 files changed, 591 insertions(+), 103 deletions(-) > > -- > 2.17.1 >