Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3662287pxp; Tue, 15 Mar 2022 03:49:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLv7J9HNpL56trOw1xtWRjuMIemsKE8a9FcYE4g7AtYp6PdL8f9Ds8lY2h38Wd9UaeQroR X-Received: by 2002:a17:907:3e03:b0:6da:8c5a:6d4a with SMTP id hp3-20020a1709073e0300b006da8c5a6d4amr22292591ejc.585.1647341366975; Tue, 15 Mar 2022 03:49:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1647341366; cv=pass; d=google.com; s=arc-20160816; b=kC0xbBwfyLR6/eTtdzs9XcCWZ/hwcOnVX9feeRsY0vOeLwKPtnujJcgSgShEqd9uAt i6K9dKxbq8wdetT5lTY00SzzFS1+lmvwEOd8E5rIeGskN0VYLZ22WnYYy0hBaH+AenB3 DNW7AgCmE4+6oCnf16dvkMPlWdyX1Y62t9yJHSU4ri5VsAXUPGHcqM5SV9TvO+WiaJnw E6M9HWm4hDM4B5sfGLHkTTSsD47YQsvvfZaMUjLkMjD9Bk6QcdvpfCqXefMj+Byg9u40 rY33331X2ojp/GoVygU4jf5INLfqNiZLforNV42iiDESRYVs/rJKu3Zc98any2o4KWZ8 7AnA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=DQfg2FJIyKz4HLb9WpW5/dmxIcOZNmxmScvf4/7fHNs=; b=AV3bLpFppV6DeyM2iMSjzssFJNokLVezPCZ00m36/UiiJOE5BKsbFMBoVxbWpZSbCo JJ3TViUqN2szf53mkprYiBBQ3tMWbFv23QVPOQL6GfUjzk8GaGszFUnKEM9/BoQzD/x7 PpC9KuLsmu7ImZLOP7suxoCiUCJGJHORBx0TaAMTp+V/k4yRbJ2SPoWHpRJrgIAqUoK/ lMDCFEYCkNoiGNSLKAcoYE+S/5v+59HXScLg/pigyMe1RcvyzkiXgitjKp9lN1EDnNlf 5WxTVg5azPC3JNgIC7C+wFpF8QUJu/pyujMfaaCbJoq9dD16y34DM7j1tElEfWD7s05m g6vg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=dmNmWfN8; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gn37-20020a1709070d2500b006da7463a634si11345829ejc.443.2022.03.15.03.49.00; Tue, 15 Mar 2022 03:49:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=dmNmWfN8; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243878AbiCNSeb (ORCPT + 99 others); Mon, 14 Mar 2022 14:34:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236981AbiCNSe3 (ORCPT ); Mon, 14 Mar 2022 14:34:29 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2077.outbound.protection.outlook.com [40.107.237.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11A822655E; Mon, 14 Mar 2022 11:33:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k9wz1hu4d+VT+UiwhFr7mE77dUj0NspPtomCChoo/z7sYlXI0kGRRN+FXy+72RpRVqZ5HcOq8zd9Ml00MpTXa4NpQoG1vvR5QCbspfTbSJnj4VEFnQ2W8af50rRyVcySZYoryblVF30KYVEa55I3Jui8i7TQcEbeY6emBvr78UxjpJwfysdgv3UhlE/BX6VttDNjt58KFm7oBhd3XDrjqGOYUx5b7sfnP2QBUB05RgMC5tUoeaeDqpntueTGuqO66sxvGeSZyJji4vrPaffR9uCPQd5pfF9KnJjAfMcH1B0c5OIaHQP48TalJODR+7/aYcvOn0ste8n0G7WjZIav+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DQfg2FJIyKz4HLb9WpW5/dmxIcOZNmxmScvf4/7fHNs=; b=Q5gpUHlZMEjGSse7zO5YlA6LDEf7rpw3xsD4aoLcaOPy29z7kikHljdz/RHi/XCmpTwXg/qgKO3BfNUzpJFEI56sMivF1XicYG7N6aFR8oXuUxQgT3SabXuq+UXM21817V9xxgXyenCRQp1ZhbuI+7Pgl7MytvHjs5kinGSRllpJVNwGHzSI6biCDKc4+IjDOtAJzRYJR9n9E7bXKmS+MBzPx2samXuW384eXOFqCfob9hKk3s6Q3Y+uL6QQuRm072xOys8crzd/tvp7KqbFReCHu8cIwWU3SohwH6Mn+X9RgjkL1+7VqZyjOOrj3qqQekfIN15PImfaLBMdAR5R1g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DQfg2FJIyKz4HLb9WpW5/dmxIcOZNmxmScvf4/7fHNs=; b=dmNmWfN832y0s8RDKgwcDexWHxi0HHTr/B+4/HqXdAwkNFbKWvxyG9IQ7e5jVg2pcMbztTqeAP7+BZ1v8dn/cs86jifTTFQ0Jhse6wkZMFa4M7x+ftygHx/AR6kQyCU2ZH5x2+Spw+e9pjvX4M3sdt4+KkC2HIWMEudppFvPsicNRpt8Vwk57jQp7rqVGoTBkfTm86DydAXFvfIRD3daOjkf0Tq/Y5IcHlMDcyMBUbw/HexqLrQs61zvJhIUwqjQ1qMTXWdglIywnif1PjS328ZP0TSqgMO0K/bx/OreydGt+fEBkrentH6CE4t3RJwv5JaUjeiJjMl6+HzBpzIEAg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from CH0PR12MB5330.namprd12.prod.outlook.com (2603:10b6:610:d5::7) by DM6PR12MB4153.namprd12.prod.outlook.com (2603:10b6:5:212::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5061.25; Mon, 14 Mar 2022 18:33:17 +0000 Received: from CH0PR12MB5330.namprd12.prod.outlook.com ([fe80::d812:d321:525f:2852]) by CH0PR12MB5330.namprd12.prod.outlook.com ([fe80::d812:d321:525f:2852%7]) with mapi id 15.20.5061.028; Mon, 14 Mar 2022 18:33:17 +0000 Message-ID: <44eeb550-3310-d579-91cc-ec18b59966d2@nvidia.com> Date: Mon, 14 Mar 2022 20:33:09 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Thunderbird/99.0 Subject: Re: [PATCH net-next v2] net: openvswitch: fix uAPI incompatibility with existing user space Content-Language: en-US To: Aaron Conole , Ilya Maximets Cc: Jakub Kicinski , "David S. Miller" , Pravin B Shelar , Toms Atteka , netdev@vger.kernel.org, dev@openvswitch.org, linux-kernel@vger.kernel.org, Johannes Berg , Maor Dickman References: <20220309222033.3018976-1-i.maximets@ovn.org> From: Roi Dayan In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR0P281CA0077.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1e::16) To CH0PR12MB5330.namprd12.prod.outlook.com (2603:10b6:610:d5::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 36e51c2d-4633-44eb-5c2f-08da05e91b06 X-MS-TrafficTypeDiagnostic: DM6PR12MB4153:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o0rgkdLmuIh8fl7g7VhLCX97dwX2CavXa+rWEUjqze9UAo113YHA/EJdLpd5zd0/m5nEJpSRRXowQQ5m4Vh9OTF8f93+lDCjDcV3REMISRapaNkBZU6CvO1Em5e+CTZjdoPzYBwWRVswcUBWHvMkYLbCHt83mcwRARlkfnt0zG/x4/zlWLrKhwLJ0sZFk2W+UHmPt/Rhw8f07WafNRgtB1N3EnwwoLV5T4xu7awJpE4rhze3NA8KaQjy6vZGCMFUtJ/HmFZkwNMYS9V5JylugRcYLcKOhLNadEkAH79gQeB8sH/WNq71OAU7ssRBYZ/qn/3Y2H15cjWuI323BUbCUE2n42yLNrARo8xn4p+tbCs02M7fgldjemxpytEl7PkajDZJP+n46hNhKrTB5eAOzgnwq+U81g273f93zkUTGC2gBLXoAmqma8AMDO9JqCO1IKCefI4Kve1Or8D/iK8NktfrfHdsxOcs32hyzsC43IXfDM9xL/jZF8P7a8VXMNREvhRoNqPSSiwPvqrUMS4WIwnP3GdTKNvd2DoN6dzQM9R2zETg1zw1eEOedSCU/zdEvJwcVzmneLgKi45nUoEuYSzAKl3jaPaU5xqzegCDEesRDA+H858mXb2iEDerTJiip+hfmXwnO2GelvF0IjtVLIklhtIfEh6ml5sAztMkNyBEXxBhHqWOvI3YBf6orofu6g+brj1w/N8Y6jxwU77d1r03QMSFASjr48sKz9IFx/GC9vdraCp8vwfWaPXGx9EFZzXH/gJDndk1Z+PVig9ZiByi4ooR+nXwRAw6EWnex5l0oejvJjVN9a/3vzumZ9HUmH/IkQkchlXK0SFCJsZzcyf+vOS83OhjXEXXLFEq4BM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH0PR12MB5330.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(4326008)(8676002)(66556008)(31696002)(38100700002)(107886003)(186003)(83380400001)(53546011)(6666004)(86362001)(2616005)(6506007)(6512007)(31686004)(26005)(36756003)(66946007)(508600001)(316002)(54906003)(110136005)(66476007)(8936002)(6486002)(7416002)(966005)(2906002)(5660300002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?amlzZE1mdGFHQlhNYzMwOHlkVm11ZFhDMkdEZFordWFVR2UxcVJEWmIwWG1B?= =?utf-8?B?ZXFVaW1vd0FvM3piS3dmaGtHNkhaZkxFQml3VGtkclVUaEVlaDJLT3FWM1E0?= =?utf-8?B?cDcvdHJNVTlaZzRpTHM5SFpBQnpXZnVUTHBkYWtPUkVpQUtmaFoyeXJ3MXlt?= =?utf-8?B?MWcwTGNhT0VLRWV2RGhOZ0g1bWwzVXBnR2NQYVJpK3l5VzA2QkdaeHJBb1pR?= =?utf-8?B?Qmo5SFVqdElqZmNXSnhleV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ant-AuthSource: CH0PR12MB5330.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2022 18:33:17.1528 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: oGU2ZzvECreoC3VT+/KqsFLSeeipHFMQrWLO/6QnkII7U3GsVXZulJPdB3A9Md8b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4153 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-03-10 8:44 PM, Aaron Conole wrote: > Ilya Maximets writes: > >> Few years ago OVS user space made a strange choice in the commit [1] >> to define types only valid for the user space inside the copy of a >> kernel uAPI header. '#ifndef __KERNEL__' and another attribute was >> added later. >> >> This leads to the inevitable clash between user space and kernel types >> when the kernel uAPI is extended. The issue was unveiled with the >> addition of a new type for IPv6 extension header in kernel uAPI. >> >> When kernel provides the OVS_KEY_ATTR_IPV6_EXTHDRS attribute to the >> older user space application, application tries to parse it as >> OVS_KEY_ATTR_PACKET_TYPE and discards the whole netlink message as >> malformed. Since OVS_KEY_ATTR_IPV6_EXTHDRS is supplied along with >> every IPv6 packet that goes to the user space, IPv6 support is fully >> broken. >> >> Fixing that by bringing these user space attributes to the kernel >> uAPI to avoid the clash. Strictly speaking this is not the problem >> of the kernel uAPI, but changing it is the only way to avoid breakage >> of the older user space applications at this point. >> >> These 2 types are explicitly rejected now since they should not be >> passed to the kernel. Additionally, OVS_KEY_ATTR_TUNNEL_INFO moved >> out from the '#ifdef __KERNEL__' as there is no good reason to hide >> it from the userspace. And it's also explicitly rejected now, because >> it's for in-kernel use only. >> >> Comments with warnings were added to avoid the problem coming back. >> >> (1 << type) converted to (1ULL << type) to avoid integer overflow on >> OVS_KEY_ATTR_IPV6_EXTHDRS, since it equals 32 now. >> >> [1] beb75a40fdc2 ("userspace: Switching of L3 packets in L2 pipeline") >> >> Fixes: 28a3f0601727 ("net: openvswitch: IPv6: Add IPv6 extension header support") >> Link: https://lore.kernel.org/netdev/3adf00c7-fe65-3ef4-b6d7-6d8a0cad8a5f@nvidia.com >> Link: https://github.com/openvswitch/ovs/commit/beb75a40fdc295bfd6521b0068b4cd12f6de507c >> Reported-by: Roi Dayan >> Signed-off-by: Ilya Maximets >> --- > > Acked-by: Aaron Conole > I got to check traffic with the fix and I do get some traffic but something is broken. I didn't investigate much but the quick test shows me rules are not offloaded and dumping ovs rules gives error like this recirc_id(0),in_port(enp8s0f0_1),ct_state(-trk),eth(),eth_type(0x86dd),ipv6(frag=no)(bad key length 2, expected -1)(00 00/(bad mask length 2, expected -1)(00 00), packets:2453, bytes:211594, used:0.004s, flags:S., actions:ct,recirc(0x2)