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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FD83C77B6E for ; Thu, 13 Apr 2023 23:42:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229815AbjDMXmT (ORCPT ); Thu, 13 Apr 2023 19:42:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229640AbjDMXmS (ORCPT ); Thu, 13 Apr 2023 19:42:18 -0400 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2074.outbound.protection.outlook.com [40.107.102.74]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57A0410CC for ; Thu, 13 Apr 2023 16:42:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yi2BJ1ioNl69AR6C77ByHVxVLDKX/V5J7OiTvm917OrbGUYlaOVecBfqnCp+EK04K0Udb0qoVKJrKm/SRcmxZeZpIRRgggDqeVbkLZqpX+4aG3RQZxElSuZcmAsphKhgAly+6NB+girW9V7BQrHzPpvQg3lS/0uBWOLXUMwNhT0w8wMXkZ/2fJcuIfCq+440YxpxvhWAAmM/BU9xUGNJKXrt7BCVZKnw50aQfr9vwGH/ZLyEbvm41NrhUELK8tT6QuDbRD9ZRGPA3eamEPjczozTsbtPLgTRtN111n8SxD6AULVr6ztk6y0yYhTDEs4m5v5YLPy65NEUzeK8SiD3CQ== 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=IPFqLuKdkrRHArWxkRO9rAbG2MX4dLmufJdGRWN2x0M=; b=caZFrdeQbGojnQ2AeGiA1O521gTMmYlCDdks73+TunI9VIzCwCRbnT4w6U8gBP1Dcs0w6v4/2PnhvcdmVsLe6Ognt+x9JCLrr4CmEIpDIxInwJCw/OKgvE5CVxQv78AjsdN9bN7T0y59DdKMwb0bAmbqaCm28WgImLaGUJur7UNNYqqX4HuiEftAXefYqAkN914IAov1cBd93tGhyjOWEwMSHrg7IRABg2cZerW7LpQGmKKxYLQDHF0f+OnIJwPpj9AYcxVLM6IdLTV3L5fW3//WxgQ+y5DfQ3RJwDzppdOxFls6BqV1Vi7ukuGH8AD7UlSDRV2V1MmYxXz94aMd2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IPFqLuKdkrRHArWxkRO9rAbG2MX4dLmufJdGRWN2x0M=; b=Jy7aKt8qWlXr7uF1rS/up5TCpRUBW29xrw/0hpTF0IOC82b0qJVJB6vqCEFXNIvvGJAVa7IbTriw0ElDM5c1MLUzGEnrMYHTWB1ffY2bh9NwHWOk4sXRtGpZWv99rkQoTdO7CegFPh5qfTboSpDRBOko0KwTPlIHG09RkCw9GLY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DS0PR12MB6583.namprd12.prod.outlook.com (2603:10b6:8:d1::12) by MW3PR12MB4586.namprd12.prod.outlook.com (2603:10b6:303:53::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.30; Thu, 13 Apr 2023 23:42:11 +0000 Received: from DS0PR12MB6583.namprd12.prod.outlook.com ([fe80::e786:9262:56b5:ca86]) by DS0PR12MB6583.namprd12.prod.outlook.com ([fe80::e786:9262:56b5:ca86%6]) with mapi id 15.20.6298.030; Thu, 13 Apr 2023 23:42:11 +0000 Message-ID: Date: Thu, 13 Apr 2023 16:42:08 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v9 net-next 13/14] pds_core: publish events to the clients Content-Language: en-US To: Jakub Kicinski , Leon Romanovsky Cc: brett.creeley@amd.com, davem@davemloft.net, netdev@vger.kernel.org, drivers@pensando.io, jiri@resnulli.us References: <20230406234143.11318-1-shannon.nelson@amd.com> <20230406234143.11318-14-shannon.nelson@amd.com> <20230409171143.GH182481@unreal> <20230413085501.GH17993@unreal> <20230413081410.2cbaf2a2@kernel.org> <20230413164434.GT17993@unreal> <20230413095509.7f15e22c@kernel.org> <20230413170704.GV17993@unreal> <20230413101015.0427a6c8@kernel.org> From: Shannon Nelson In-Reply-To: <20230413101015.0427a6c8@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BY3PR10CA0014.namprd10.prod.outlook.com (2603:10b6:a03:255::19) To DS0PR12MB6583.namprd12.prod.outlook.com (2603:10b6:8:d1::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR12MB6583:EE_|MW3PR12MB4586:EE_ X-MS-Office365-Filtering-Correlation-Id: 52394aea-7169-4c6d-55f6-08db3c78b3d7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MHW5kT9hH1nMb1ezRR2+aRc3S5m57aoogS2jzNqzaBZlvbwPxYDKFyBTwU3yfVykBZWNlUKx6ENuR2pjt88vCY8NRHyqB33aFKWSxXvLqGvjdV3TnnpEY9l4Ueb4ohGqFI10wHiFsVG4Bs/f3AZRA5P9WP2dTymzHOA5p1U7MNd8Rncbexa8ALoQK/PSH16n9cnij0kaqhUltJhIW2LUwWzHOdNW5qj5Q0TAug1+Rf2w67hg8VibXtp0Nxy5A26ZDTDjY/lE6aF9LR/Qi4xxBY+5uoGnLAGRGnm3LF9fu8x4UGLeoHRCKYF3sbp7Xs891ib4XlXI7eyQIfTFn3QROuIJJ2H3uH1BhDDUywOOWRLCbDAVzz+eK7VoHtOgrFw0sBvF/RTQprlFjFZTiHGIbmlG5YTcL3tfTtcIKapTiEoEbMh81fpuR/dUxHWRy15ukzRHQidwTQZIOY11tm74h0pa6y2qHrw7gb+P59aatYVszJEM0apd9J33V/D4FA5WtwImcGtgP/iIq28oQIs2MRf5JKBDZNZhb0N9SHCxdgFVEC0HmfTAO0fdr5VlKka6nJoQslBTlRgbYchuq8MLa4/nsk1rZip81OEySanW6LWyLJD8TA5pLfmBh+GWTjTDhPLJeCnmARqcoezlphVau0kEefzUaJGIicCMsi2XTFyEDPuLpJLuYu1bWXVas6k3 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR12MB6583.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(346002)(366004)(376002)(136003)(39860400002)(451199021)(31686004)(66899021)(36756003)(5660300002)(2906002)(38100700002)(86362001)(316002)(8936002)(4326008)(31696002)(8676002)(41300700001)(66946007)(66556008)(66476007)(83380400001)(44832011)(2616005)(186003)(6506007)(26005)(53546011)(110136005)(6512007)(478600001)(6486002)(6666004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QW1BV25BKzFIUVNoMnp1N052cmdTczF0dnhQRDRZZlVCOUwyYTZBdElBcklK?= =?utf-8?B?czJLN3pUeXJUU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Xhx?= =?utf-8?B?aGNiTWdld1Z0M2grTDlFZVZYRnF6VDhubUVFcE1uc1VaYnVUSjNoSTVsTCs0?= =?utf-8?B?ZGVwL2wrYXNyc3hwaTE1YmtZdVExKzVsRU04VUdwdjF4MUVYd3RpeU1OeDhh?= =?utf-8?B?RzV2YlBOMzZXWU55OVRmekVDTFRzM012RG1IZkwxUnZ1Qy9CZWlhck94TDZK?= =?utf-8?B?cmZpeVd1bGpxYkFENWJFdWZVb09CaGMrT2VaMEY2UG5HVVVZUG1EYjVnZ2lV?= =?utf-8?Q?uPOgLsPdsGCEhhPHo1j9ocYbA?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 52394aea-7169-4c6d-55f6-08db3c78b3d7 X-MS-Exchange-CrossTenant-AuthSource: DS0PR12MB6583.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2023 23:42:11.5755 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +M29ZELZNGKD2zlmovMTB/HUdJW5wBCPp7EjNRmPnm1d80WFGFREY1vFFBw1J317HsIvGvdfpXfMxvHS86t/xA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4586 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 4/13/23 10:10 AM, Jakub Kicinski wrote: > > On Thu, 13 Apr 2023 20:07:04 +0300 Leon Romanovsky wrote: >>> Hm, my memory may be incorrect and I didn't look at the code but >>> I thought that knob came from the "hit-less upgrade" effort. >>> And for "hit-less upgrade" not respawning the devices was the whole >>> point. >>> >>> Which is not to disagree with you. What I'm trying to get at is that >>> there are different types of reset which deserve different treatment. >> >> I don't disagree with you either, just have a feeling that proposed >> behaviour is wrong. > > Shannon, can you elaborate on what the impact of the reset is? > What loss of state and/or configuration is possible? The device has a couple different cases that might generate the RESET message: - crashed and recovered, no state saved - FW restarted, some or all state saved There are some variations on this, but these are the two general cases. We can see in the existing ionic driver there already is some handling of this where the driver sees the FW come back and is able to replay the Rx filters and Rx mode configurations. If and when we are able to add an Eth client through pds_core it will want this message so that it can replay configuration in the same way. This case will also want the Link Down event so that it can do the right thing with the netdev. For the VFio/Migration support (pds_vfio) the RESET message is essentially a no-op if nothing is happening. But if the system is in the middle of a migration it offers the ability to "cleanly" fail the migration and let the system get ready to try again. For the vDPA case (pds_vdpa) we can trigger the config_cb callback to get the attention of the stack above us to suggest it look at current status and respond as needed, whether that is a Link Change or a Reset. sln