Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp534282lqp; Fri, 5 Apr 2024 00:46:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXkek4NqCrvURtewK59XCrUc2DQMEwCtIoDIsGHy5fqNi1l3qGdIwirXuVsbhZ6Jzi4XTdZNJ//gk/SQMNxQHFXYIbPsrUPB8WgmF70Rg== X-Google-Smtp-Source: AGHT+IFXUq7SHhDEWslkp2U7NSC5UdqFZ9FXHbJ3yEULlHTjBgADXIzsE2VF4ejSnfYS6PpltSeM X-Received: by 2002:ad4:5bc1:0:b0:699:1a5a:59ad with SMTP id t1-20020ad45bc1000000b006991a5a59admr606235qvt.21.1712303210232; Fri, 05 Apr 2024 00:46:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712303210; cv=pass; d=google.com; s=arc-20160816; b=I3tu8gCELuhZELID0eynfHdvCdTRV89yd/RGQAZI9WzYcdx7B+rUBQnDLaLt8h9uSM hYB6/ccCXeH/VsL33vSGE5+17mfNErDyvzvBmrcIQbNEFrKvif2RnDDoRakbLCC7YOn4 o/PRAl5C5v28FvH9oEFTrEDc3e+ppPXaT6ZJQnWJgZMp9KEXHTQaDzQaqpI5yuCqsozv d8qVatTukKW9S4j7Sd8yEWryKMXjC3xe0S88aUNP4n2HU4Jx1qpw8Ika6kARo9+72/pw sHAcIrxtBrFFZfqmUSLw56jTzytStt5II9Y591aZVTg3ylcyXFgXy1pkHU/HMk3Yatmf 5w8w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=dc35WwZnB5glP9yGjfCIqJkOIKEGoJwMq7P5nZLHmVo=; fh=bY1A21UXyWPKD6+ykc1AVbHouVn5flRfwAjEUy/OkXU=; b=MP5T8fiFel3mLOSSykpfT0s5fjzfSuJg5zqebRFQFFzAS0M27ql82V0iJhknyLzfcG 6hktlB0K+KHTBnFUvLMWnEdrfvAw1yq8PILFyRNIeM+o6YUAog1/GZ17QCkAJNrqxTLJ o12Y79ilXMDv8B9mbeQVv8eoajy/23ESVJg4bRuQMXi/J8JwzGhbvM0moIklOyctohJI N7mL1Ky4+Ro1Q1oTq2fVjrgRiqwJTpONVv2Hw/JSEFh+3jVtVzT4NRnDCe3U9DVR+JO/ JnphcWL2QQqGtm1qr1YP4bNttFBE3SSEZ7gowAdkGud+yfscFTs7A56BlFEdzXRxaokK HlvA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=C8iLZcm8; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-132584-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132584-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id b19-20020a0cf053000000b0069919a57f2fsi1202660qvl.110.2024.04.05.00.46.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 00:46:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132584-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=C8iLZcm8; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-132584-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132584-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microchip.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BCCA01C20D83 for ; Fri, 5 Apr 2024 07:46:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D0AA13E414; Fri, 5 Apr 2024 07:45:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="C8iLZcm8" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA15013D601; Fri, 5 Apr 2024 07:45:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712303158; cv=none; b=OW60alDTRbCkxl6lHEGpDMr0WAObwrf1pHix2TFkTLAiWGp/yqtfKwOje6yibRo8IjEma2pygg2SYtNIRIVZ9Rui+VW0Iq6oQNTvmiHNsY11LTKUpePxM84BLjiKfGt02F1+S4+QmNTYV3wmvLTKS5OmlXJjv2OBochpXGYX/Hc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712303158; c=relaxed/simple; bh=1ZDpfD3a7RKRHSzvUXknQC7JfUb0EeRAFmr7HaGNp/o=; h=From:Subject:Date:Message-ID:MIME-Version:Content-Type:To:CC; b=PBmc00OJo9R5TwLPjKl4w+ArT3joSOopwMAc7ipWRJOSKV3AcWUdZV5aXpGXVt9OfSTsJyX5433WEY4kBCiiP7IrKrOfBf61CWBwn1osej/eHhdqT3i2ThxnW2AnCRbk0H0qy00sVOmGiDxsYRMxE0xB6B4GuYaKMy4sltDCB/s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=C8iLZcm8; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1712303157; x=1743839157; h=from:subject:date:message-id:mime-version: content-transfer-encoding:to:cc; bh=1ZDpfD3a7RKRHSzvUXknQC7JfUb0EeRAFmr7HaGNp/o=; b=C8iLZcm86fGH+YItlDduL3fgCedtW+DakpMZKJ+fJIJE+bEA7RRdk09s SqGTDod12h1DM74XxArsVmB8TfnTxuaV0Uf36JLX8uTnygCJfh/y0+PsN Zil+I4Px5OEX1nWrT8UjTeV6MJV5743hghkGtq2Dc5BNX7VVfvqYN45TW 9bgHHAckGCWckD0RJLKrMKDxOf3dnoox8noavqR6Sc0+abuTsmWdkf2na rP9tZpX3wHSFI1olN2fmUNsKIVnPX0C6ZfJ7BiEQkP+LWBbZZxsYQUiMl 77RzYz8JsmP1M/hhmxZq8J/XbcV7aJ8jS/QM0HEsXfJ7PWkcZGR2xv3pn Q==; X-CSE-ConnectionGUID: 4qZUTU13T9uNgS2+V4FJcw== X-CSE-MsgGUID: iW+rMIoVTuCswnVlz6AsWg== X-IronPort-AV: E=Sophos;i="6.07,180,1708412400"; d="scan'208";a="250415236" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 05 Apr 2024 00:45:55 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 5 Apr 2024 00:45:03 -0700 Received: from DEN-DL-M70577.microchip.com (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Fri, 5 Apr 2024 00:45:00 -0700 From: Daniel Machon Subject: [PATCH net-next v2 0/2] Add support for flower actions mirred and redirect Date: Fri, 5 Apr 2024 09:44:48 +0200 Message-ID: <20240405-mirror-redirect-actions-v2-0-875d4c1927c8@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAPCrD2YC/3WNywqDMBBFf0Vm3SkxPhq76n8UFzJO6yxMZBLEI v57g3Tb5eFyzt0hsgpHuBc7KK8SJfgM9lIATYN/M8qYGayxtamNxVlUg6LyKMqUcKCUlYhEdds RNa5xLWR7UX7Jdpaf4Dmh5y1Bn5dJYgr6OS/X8tx/9epvfS3RIDm+kSsrS657zEIaaJLlSmGG/ jiOL7BiBU3MAAAA To: Lars Povlsen , Steen Hegelund , , "David S. Miller" , Eric Dumazet , "Jakub Kicinski" , Paolo Abeni CC: Ratheesh Kannoth , , , , Daniel Machon X-Mailer: b4 0.14-dev ================================================================================ Add support for tc flower actions mirred and redirect. ================================================================================ This series adds support for the two tc flower actions mirred and redirect. Both actions are implemented by means of a port mask and a mask mode. The mask mode controls how the mask is applied, and together they are used by the switch to make a forwarding decision. Both actions are configurable via the IS0 or IS2 VCAP's (ingress stage 0 and 2, respectively). Patch #1: adds support for tc flower mirred action. Patch #2: adds support for tc flower redirect action. Signed-off-by: Daniel Machon --- Changes in v2: - Squash patch #1 and #2 from previous version, to silence the false positive NIPA warnings. - Return directly from vcap_rule_add_action_u72() in *_mirred() and *_redirect() - Link to v1: https://lore.kernel.org/r/20240403-mirror-redirect-actions-v1-0-c8e7c8132c89@microchip.com --- Daniel Machon (2): net: sparx5: add support for tc flower mirred action. net: sparx5: add support for tc flower redirect action .../ethernet/microchip/sparx5/sparx5_tc_flower.c | 68 ++++++++++++++++++++++ drivers/net/ethernet/microchip/vcap/vcap_api.c | 12 ++++ .../net/ethernet/microchip/vcap/vcap_api_client.h | 2 + 3 files changed, 82 insertions(+) --- base-commit: 5fc68320c1fb3c7d456ddcae0b4757326a043e6f change-id: 20240402-mirror-redirect-actions-cc469cc58586 Best regards, -- Daniel Machon