From patchwork Thu Aug 30 14:27:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sameeh Jubran X-Patchwork-Id: 10581921 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2269C17DB for ; Thu, 30 Aug 2018 14:47:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 128C62BEFF for ; Thu, 30 Aug 2018 14:47:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 069F92BFBE; Thu, 30 Aug 2018 14:47:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9E4572BEFF for ; Thu, 30 Aug 2018 14:47:03 +0000 (UTC) Received: from localhost ([::1]:49336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvODu-0001Ac-Un for patchwork-qemu-devel@patchwork.kernel.org; Thu, 30 Aug 2018 10:47:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvOAP-0006fw-HF for qemu-devel@nongnu.org; Thu, 30 Aug 2018 10:43:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fvNum-0003ZO-2W for qemu-devel@nongnu.org; Thu, 30 Aug 2018 10:27:20 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:53111) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fvNul-0003To-Ni for qemu-devel@nongnu.org; Thu, 30 Aug 2018 10:27:15 -0400 Received: by mail-wm0-x244.google.com with SMTP id y139-v6so2197602wmc.2 for ; Thu, 30 Aug 2018 07:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=MBbZLetqE1FzS8lLwuCnruhUG5MNj9KrR+HLu7iSSBE=; b=RjbvsCOt6jOY6q6N+1pQPW9uZPm1rtLQqRiduMuS0aST2A11J9CgaPxNTLTlCYcziQ bYYkcOEm2iZIx53d+pX/ocCh/vHiQ+GtuwoLpLEyfTGuLHsGhYc1jnsE2OmNBxDCRYm8 udVFCFHWr0CEy7rqRVRiaiH7cjJzE9lpTtDNbOi9GeaKY3yN1GU652taECoTuSmL21vv Mz739HhwRGop/PZvSVnAfq30G1TRj2Hx4JRsRvodS1U2qKf400mm2YuwAIxC65lxhDl4 wG3v4wT5Yvky6qusRDoo6TP3Z9KKghFI8E//j1U74d8nNTOxyyy6zVuzNOjjU/sAzIsA Us9Q== 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=MBbZLetqE1FzS8lLwuCnruhUG5MNj9KrR+HLu7iSSBE=; b=MXZ5a+hYFPvgrvSOE8v0Y73UhW5s71eG4nca2draZ++B2BFddcYq480Fa7MtMs2OLK bKjeduXIkN3ACMUX6ySNNq6JbiZ1ysgtgpdYYLhzEKGrpI+9Y64K2Nu3QKKM9oEpXBSD kFmFrUiFG4Rj87jk67lPqLyrScJLc5Z2xQlGvilqjvFxAMHWYCfs6s1guxDJtz4Y6R6w dNEb4td98W6aLtQt4n1Lnv57ChAcw24qbFhpxU9HMvbkidXAP+jfD4W9RdMDHwAoKtWV P07EJ5g4i0w5bh1m0g8PqvaKVOiHXcuqD8RlOVs4bflYF6mP1bZCOmNIl+FKPoONxXZW +Dfg== X-Gm-Message-State: APzg51CsPCo+qaVwDS/nm0Z1wf7O2rtGMYPR94uIFoK4gIFIQzrVuVo1 2ATplr7ecD8QK6xF/W0Ty2EME+mNptQ= X-Google-Smtp-Source: ANB0Vdb5L69SPV1gIp6Z7+oL87gWW03311cgExql60JN/dAkJgslxOZ5dBwpUHVGdJHORWaODI/Gmw== X-Received: by 2002:a1c:bd84:: with SMTP id n126-v6mr1989907wmf.67.1535639234192; Thu, 30 Aug 2018 07:27:14 -0700 (PDT) Received: from bark.daynix ([141.226.163.173]) by smtp.gmail.com with ESMTPSA id t4-v6sm10483893wrb.45.2018.08.30.07.27.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Aug 2018 07:27:13 -0700 (PDT) From: Sameeh Jubran To: qemu-devel@nongnu.org, Jason Wang Date: Thu, 30 Aug 2018 17:27:02 +0300 Message-Id: <20180830142708.14311-1-sameeh@daynix.com> X-Mailer: git-send-email 2.13.6 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::244 Subject: [Qemu-devel] [RFC 0/6] Virtio-net: Support RSS X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yan Vugenfirer Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sameeh Jubran This series implements the Steering Mode feature which was introduced on the virtio-dev list a while ago, which can be found here: * https://lists.oasis-open.org/archives/virtio-dev/201805/msg00024.html The first three patches add some infrastructure support that is used in the following three patches. The ebpf filter doesn't fully work yet as I'm having an issue with the verifier which needs to be fixed. The patches still need some love as not all of the cases have been handled yet most of the functionality has been implemented. Please share your thoughts and comments so I'll move forward with sending v1 along with a fully functioning ebpf code. Sameeh Jubran (6): Add bpf support to qemu tap: Add support for bpf ioctls vhost-net: Expose vhost_net_get_fd virtio-net: implement steering mode feature virtio-net: steering mode: Implement rss support virtio-net: rss: Add bpf filter MAINTAINERS | 5 + configure | 44 + hw/net/rss_bpf_insns.h | 3992 +++++++++++++++++++++++++++ hw/net/rss_tap_bpf.h | 37 + hw/net/rss_tap_bpf_program.c | 172 ++ hw/net/vhost_net.c | 2 +- hw/net/virtio-net.c | 250 +- include/hw/virtio/virtio-net.h | 5 + include/net/net.h | 3 +- include/standard-headers/linux/virtio_net.h | 55 + net/tap-bsd.c | 5 + net/tap-linux.c | 29 +- net/tap-linux.h | 3 +- net/tap-solaris.c | 5 + net/tap-stub.c | 5 + net/tap.c | 8 + net/tap_int.h | 1 + qapi/net.json | 11 + scripts/update-linux-headers.sh | 8 +- 19 files changed, 4627 insertions(+), 13 deletions(-) create mode 100644 hw/net/rss_bpf_insns.h create mode 100644 hw/net/rss_tap_bpf.h create mode 100644 hw/net/rss_tap_bpf_program.c