From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 483F5C433F5 for ; Thu, 28 Oct 2021 09:23:11 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC651610CB for ; Thu, 28 Oct 2021 09:23:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DC651610CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:35206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mg1cr-0003DZ-Im for qemu-devel@archiver.kernel.org; Thu, 28 Oct 2021 05:23:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mg1bb-0001B2-N4 for qemu-devel@nongnu.org; Thu, 28 Oct 2021 05:21:51 -0400 Received: from mga11.intel.com ([192.55.52.93]:39002) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mg1bY-0005oG-Un for qemu-devel@nongnu.org; Thu, 28 Oct 2021 05:21:51 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10150"; a="227819640" X-IronPort-AV: E=Sophos;i="5.87,189,1631602800"; d="scan'208";a="227819640" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2021 02:15:14 -0700 X-IronPort-AV: E=Sophos;i="5.87,189,1631602800"; d="scan'208";a="498301880" Received: from unknown (HELO localhost.localdomain) ([10.239.13.19]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2021 02:15:12 -0700 From: Zhang Chen To: Jason Wang Subject: [PATCH V5 0/3] net/filter: Optimize filters vnet_hdr support Date: Thu, 28 Oct 2021 17:05:53 +0800 Message-Id: <20211028090556.3168043-1-chen.zhang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=192.55.52.93; envelope-from=chen.zhang@intel.com; helo=mga11.intel.com X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhang Chen , qemu-dev , Li Zhijian , Markus Armbruster Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This series make filters and colo-compare module support vnet_hdr by default. And also support -device non-virtio-net(like e1000.) at the same time. It can adapt -device automatically to avoid wrong setting between different filters when enable/disable virtio-net-pci. Optimize the filter transfer protocol from: 1.size -----> 2.real network payload. to: 1.size -----> 2.vnet_hdr_len. -----> 3.real network payload. When receiving node get the network packet, it will compare with the local vnet_hdr_len. If they are not the same, report a error. because this kind of packet cannot be correctly parsed by receiving node. For the colo-compare, it need to compare whether the two sides vnet_hdr_len are equal. v5: Keep the vnet_hdr_support from filters for the management layer compatibility. v4: Rewrite patches to impliment it in filter transfer protocol payload. Remove filters and colo-compare's "vnet_hdr_support" flag. v3: Fix some typos. Rebased for Qemu 6.2. v2: Detect virtio-net driver and apply vnet_hdr_support automatically. (Jason) Zhang Chen (3): net/filter: Optimize transfer protocol for filter-mirror/redirector net/filter: Optimize transfer protocol for filter-rewriter net/colo-compare.c: Optimize transfer protocol for colo-compare net/colo-compare.c | 24 +++++++++++++++++------- net/filter-mirror.c | 34 ++++++++++++++++------------------ net/filter-rewriter.c | 6 ++---- 3 files changed, 35 insertions(+), 29 deletions(-) -- 2.25.1