Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4410379yba; Wed, 17 Apr 2019 10:52:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpx9ntDjsN3u5TnpjXX2IOESdKdUn3MVHhbA/9ZBo3cFUaXnkiXpmry8H55Iu9t+M8K2EE X-Received: by 2002:a17:902:e391:: with SMTP id ch17mr92306136plb.196.1555523552236; Wed, 17 Apr 2019 10:52:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555523552; cv=none; d=google.com; s=arc-20160816; b=gvM592IkmPpA/Abakb1mdPmCv6m0oP7D73hwC22uMFtxHhFIxJ0IfMWKDT331ty6G6 9gG/mw9/CKi6dowpaJja+a0kPIcWKe6uRJGlt8dFNRm4nIzzAluKHLmK6E5aHCtYJUze JTMZ79aJAFauUox50mpKYrq0SbVzFBeacn8eURNWIDY29T02P8n3x0m2qzPfkkv1WXBS kyqzjkiMD+hJ8GpojfYQQf1OFCCwId2lQlRteyRnELfAU0Cv69lI+OI7kz7OtdWiUONE RqQNNHOt2s3tcW2Bfb/ZV8B8BOKQOlwgJnvvDixejbeQk3qbIvQJDur6KAxyV56a1MmS ydLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=hHpxRlsiI7GvZSM+HkyKQPu0rObcw/POqpTIQVI3tSA=; b=Mq5SCHzE51SA0lWoKSKozTQDKLMS9lUwS/JKtecfo+HfpCVPtnTazCKfVle7c6ZsRK lRp01goPwrH6/pSRojupSlYUbW+wlO7Lb8zps23e45huenSNMvb6gjDo4klv4J8vlN3V iHIKqaavmbI8y1xmHeFw5WZycHU0cuq1cx7ppDfU5jtQ9c9Lr1ycuIfSn8CmB3c2IgVu WmVwkxaP7oK4qCWvq4feDLPvaYFPK68fpJbaEbkg7gMm4G23xwaXKIJ2O5utPmXbVUT2 FpTSz/xL5zhZ16mRoPcqfE6KDuMo+ujwKmA8DAkdveP936ZYp4hqBElUZC28b1MxrB1p XVrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zdILDgDt; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j65si50241343pge.48.2019.04.17.10.52.17; Wed, 17 Apr 2019 10:52:32 -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=@linaro.org header.s=google header.b=zdILDgDt; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733169AbfDQRuK (ORCPT + 99 others); Wed, 17 Apr 2019 13:50:10 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:35229 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733109AbfDQRuI (ORCPT ); Wed, 17 Apr 2019 13:50:08 -0400 Received: by mail-lf1-f65.google.com with SMTP id j20so6664473lfh.2 for ; Wed, 17 Apr 2019 10:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=hHpxRlsiI7GvZSM+HkyKQPu0rObcw/POqpTIQVI3tSA=; b=zdILDgDtdu3OIxwYRtN2PyPe9WxxvQu1KOtzg7eDwEvm49Z0o+2lnaNEt6ePNo+m2P yBFjM6da6vX3QnQsNjic0Hy9FjlWfcXSLo2b5ezAZ+qTrR1qBPTKj/KFPthwGiHOaPJj ZCuXA44G0qe10XhjxYfusyxE/4KloUCw2md/Tbs+40RSejCYp1/qKE4YoN0MRm0z6OZM JyRFCLFqPQWu/6UYj4cqlyzEx+FdeNvDl6u8OXLe74OVYxd7JOEGRLncU3LpjBhHBI/A kG0ulgqeBpsds+pPUwuFimDaYXlK+ssK9o9BjCoI2i68WD+BeghHf2hpTYO5xaW+hGr0 UUbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=hHpxRlsiI7GvZSM+HkyKQPu0rObcw/POqpTIQVI3tSA=; b=V+S9hX/7o15ILAuAXQh9RgomrIB6NKCeXmrQZvt/e4qwqpP2I5G3Wlp6vtQz5Ab7kG /gIzOFAcRNhRpp+Hir+g2HtZ0NY8WfDZcG+PqhC1IieLR7OckcrDxfPx1iYG6SZsv+St gLaj7AjhvGyW0q1QTSWC9ZoiOh+xv6qlsSesMivqCxlLKeDcXcrXIubrhxbKuAN1WOA6 5MwM4408jFrv61kUVp1iTOTKR+C99ugDXn2PG69Of6eyVN2RLt8QXTePv9NpChlOuX4J qaqwPIqMBK5icW3vOkH/JCYp/J8jCme2H20qKCqAZT5CuE7Qod7VM2ooNV/Y40hwPauO F+MA== X-Gm-Message-State: APjAAAUZ7T6v/Wpzh9FaBX6eEBR+DlsEoO3k1T+SarTltguNmdIVhR+R KtEcmVqySiCmb34cHScXuRj+kK/Rhhk= X-Received: by 2002:ac2:554a:: with SMTP id l10mr15734978lfk.45.1555523406673; Wed, 17 Apr 2019 10:50:06 -0700 (PDT) Received: from localhost.localdomain (59-201-94-178.pool.ukrtel.net. [178.94.201.59]) by smtp.gmail.com with ESMTPSA id f4sm11197173ljg.37.2019.04.17.10.50.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 10:50:06 -0700 (PDT) From: Ivan Khoronzhuk To: grygorii.strashko@ti.com Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, ilias.apalodimas@linaro.org, hawk@kernel.org, xdp-newbies@vger.kernel.org, ast@kernel.org, aniel@iogearbox.net, jakub.kicinski@netronome.com, john.fastabend@gmail.com, Ivan Khoronzhuk Subject: [RFC PATCH 0/3] net: ethernet: ti: cpsw: Add XDP support Date: Wed, 17 Apr 2019 20:49:39 +0300 Message-Id: <20190417174942.11811-1-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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=y CONFIG_BPFILTER=y CONFIG_BPF_SYSCALL=y CONFIG_XDP_SOCKETS=y CONFIG_BPF_EVENTS=y CONFIG_HAVE_EBPF_JIT=y CONFIG_BPF_JIT=y CONFIG_CGROUP_BPF=y 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 added that can be seen here (rough fixes, for samples related seems like last version 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 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