From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7BEDEA0C47; Wed, 3 Nov 2021 19:42:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B05D40E0F; Wed, 3 Nov 2021 19:42:06 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 9EAC140689 for ; Wed, 3 Nov 2021 19:42:04 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10157"; a="292404389" X-IronPort-AV: E=Sophos;i="5.87,206,1631602800"; d="scan'208";a="292404389" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2021 11:42:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,206,1631602800"; d="scan'208";a="450170463" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga003.jf.intel.com with ESMTP; 03 Nov 2021 11:42:03 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 3 Nov 2021 11:42:03 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 3 Nov 2021 11:42:03 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.176) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 3 Nov 2021 11:42:02 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FWOzlDY1K3vP0XpgyHCX4OLUrCC9HH299p4U2BtdyNaSBLPioRLQIJiOHKR71objz8N556A53Q7jVcaKAQhF8/5TfE7iakK78K6yOKJj4JgQo3vftp+Cr8Egjqr0xmAXLDXvgp2MtTqjdslhfHFLngNmKpsoVso6dKwyDEw40byiWzF4zRSa5nRGQzvqT+fLJdQzYkffcZO0cqxkFhDLw+4b8xgQG1YWWxdwD64n4+BLxjOvbYkZru1hF1GcK6IbWIbEypaGfCkRH1mwYJXj8aMi97Qb4t8iLLc41qEs5HsgvToHjDhIXESf58Z0CdosPyg4Snf7XL88+FjTj2O3Dg== 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=BBLpvuxKnZWt3keVwAvVgAj+lOMUjg27XancvqXult8=; b=F+B4q5PRnzz/DH0bfZ99qgwrar3vcuGFFosn5gcfDWrNTj8fKFpKJ39HTCwDerVOA4Ycc0hDHB0Fh6kXeEutFwI/v+nZXuumUZoeuCIIVlqKEaX8LnXCglHQQ1MmJQ4Htu40ZE73bRrAtE0xQ+QXEa5NkSa4+4MZvbi2UkLqVh88/uEuQh1mnqGTTj0ieSfqcZw3mPAcghPoRArHtZi6hkbXU6yZHVLpwyPuj0u3TPtm/8WguAQ0PTQEjsdPUuNTDJTNRYhMSttCIW92RvT/RHslnCL22+z872jAV7uVvJONjkE9Dw/mjJn6+DhZjfuYkxXoiPjEYqb71i7plUF4rg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BBLpvuxKnZWt3keVwAvVgAj+lOMUjg27XancvqXult8=; b=zCz9KFQwNVPGbI69YzhVBqNy3lzV0YAcISf5WYRsZtnX5JQCu0SjMlqQ3F8lisKOcmF5hIe82k2KYrRYrOO9xLrwhPly3ykZXHhcG4eUAMGFIu8WDbgUqUrUW/I9oIDlCanGQDya7zXpNU+fzORu25QLhhArViS7bh1ZPH7x80k= Authentication-Results: cisco.com; dkim=none (message not signed) header.d=none;cisco.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5159.namprd11.prod.outlook.com (2603:10b6:510:3c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Wed, 3 Nov 2021 18:42:01 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c%7]) with mapi id 15.20.4669.011; Wed, 3 Nov 2021 18:42:01 +0000 Message-ID: Date: Wed, 3 Nov 2021 18:41:56 +0000 Content-Language: en-US To: Hyong Youb Kim CC: , John Daley References: <20211026000256.11492-1-hyonkim@cisco.com> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <20211026000256.11492-1-hyonkim@cisco.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0365.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18e::10) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by LO4P123CA0365.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 3 Nov 2021 18:42:00 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d5c689a0-ce60-4348-dc67-08d99ef99f95 X-MS-TrafficTypeDiagnostic: PH0PR11MB5159: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2449; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d3sI57SVOQKs8xuj/xBhF06B6lV5x9CiQyHvSKg3ot9tLg5aa4ZIWsEKy9PwbN6qAJTf8v9hqdXn4lKvzey/X/m73pWpCyS8oyqh9Rv6fmFlQrR8LOSHz+citxfp7wdBX3jf8uz5elpf7FnfxxOOeCg59Q2w8zlmdTKM0nYr/7ELpslXx3M4x5pEAb+HbTzhD5n7Ex+npArHZXvoIVL5myYiINS12Sf3hagIXvOZ6fM7kyJjaXYg5MVv8rSH24VGCaQOsMa6pA0Uzz7S3cVzlQVY/dEyXE+JlY7qHPboAMJQFil12Cv9oNVs3+4hLkQdGDdVl4f5HEXQrmg1Bkdd5c2AQFH+CP7PAEth28YQGbWnLfBaNYufylHLgqJl4dxUAyhn/KAMAwX2KWQLO+j+TOhbnBe3qhL1nzmdrDIOdCYBHymaL+glyRBcBTfw+c9CHwrKbrAot5V4IBWMKTQXypkBiT1Q/gDHRVOaSj8L5NPwHxx9qYCH0kOgOYWfAqQxN6gt3g5NdzHcG4h6LedInrbKQN5LTKwKDAOjwjUWh/glxSws2/Hi0oFP9wzaeKqXUFbua0PYv6/ZEMCD+auuML5QfcwGfClcz2VIIvOapiuBtLNolRl0++fvfVKwqFrR2aqS9KjMMDGqymB0+zxXfJ8sNPWbI5HS9AIdLsOlSSzIxmJFynfYEa819jReb7sWI9XS2RYCCHMRZZ+AmaIrMg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(6486002)(66556008)(36756003)(5660300002)(66476007)(2616005)(31696002)(31686004)(44832011)(2906002)(6916009)(956004)(8936002)(508600001)(38100700002)(86362001)(66946007)(26005)(186003)(8676002)(53546011)(4326008)(6666004)(83380400001)(16576012)(316002)(82960400001)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cWVFU0JEOTVjRlZHaUtIc0drbzRTbG11c1VuRjdsSDFqMmxITHFLbzBJYm9N?= =?utf-8?B?TVRrZlhBdlh4Sms5RTUxVmlJZnBoeHNNckV3YlJGVEh3aE5WVmwrckJ0ZDM0?= =?utf-8?B?eDRQSW1UQ1NyUWQ5QTRjYmJucjd4eWgwb3J1RC9sVC9lY0Y2aVNJNEtmbS9j?= =?utf-8?B?K044cC81UzNwY3RhS0h2SzdTUzg4VStWR1FSVTBubzkydmhhd0dnVnJzYm15?= =?utf-8?B?d1Irdzg3czZESFlPc0xJMENNZGt4YklnWjZJVTNDL2xuemFlT3lnWjdEN3l0?= =?utf-8?B?Q20zMzVUN0N2MTZhczlHYmZWRmp0THh6aWg3SkxwMTZBQmZKUEh5czhQMW0y?= =?utf-8?B?QnJmVUdDMGRGU3M5VzBLTFVlbHNoL3VDWGZoeXdkUVh1UkE5WjNMUWFybmM1?= =?utf-8?B?Q1lLQ1JmT2hJeUcwN0lWOXNhRHlDNlBJSThCOVFINGpuZEQzZmhWanpYNlNF?= =?utf-8?B?RVgwRS9sbDlUQ3lQSmpDU2theExDOVRRM1JOcGlVQTUvMVFSdzJHRERwSjd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N5b0UwTVhk?= =?utf-8?B?U3hHTjN0ajhOVUg1TFM0TUx4dWZPSFg4NWp6Yno1NlQ2SlNsSU1vNG1qa0lC?= =?utf-8?B?ZlpJd28wUit5MW9qcFdiWDgzVmpkSGRuaEpScFVmZVVRZG80Wnc2MzBvQXE0?= =?utf-8?B?NUVUNVVRNk02Y09Sa3hieDFBamlKNWtaQmZoYW5udHppRStTTVprTEJTZkM2?= =?utf-8?B?SkVNd3ZKVHAwOUlRT011UTYwWkliSDhFajd2dWdQZVdPcUt6TzROT1diT0Vv?= =?utf-8?B?dmpjWUhadjFCejBxc3o5MEk0TWZOWWNFbmZlVHhwaGh3T3RtL3NnUHYxanZn?= =?utf-8?B?Qy9NRTY5akx1VzYzOW9QY2NOMUtOQkpxUUVLUGpoZXRDRUtKUW1XcHBSYWdH?= =?utf-8?B?N05KYTVEOENtUlErZWpCdkRNZ2dhamZxU00zMDVWY1U5ZEdOdnNTT3R1SDlU?= =?utf-8?B?aXpmeGFXOHg2Z1NZYW54ek5uWkMzdTF4QUtJcEJtWVdkSkxobEJsUW1zb0pZ?= =?utf-8?B?QmNWOThjZUd1enpuUFUwalBxb2YxUEd0ckkrNllLcUZJdkxQZnJFck5EeGQ1?= =?utf-8?B?RnBEZVRjMmZ3aUh4Y0hvcEFxeFlLWFJrQ2VnZFhZaWo0RWg4VjNBS1o2bXZO?= =?utf-8?B?Y2Z5VS9XbTJoVHZmSzFzMzA4NjlxdkdKTFRxbG95SGVrSVA0eTAwaWQyWlYw?= =?utf-8?B?SVNEai9ueVE0MTQvUVpnVkZZRVA1bVhnZ2oyZWpvUDFoRmNudlM4WFNIb1Ns?= =?utf-8?Q?7UqGVnfic3Vww7A1ZHpzF1c=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: d5c689a0-ce60-4348-dc67-08d99ef99f95 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2021 18:42:01.4584 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hTVI9oqIYbuaElnMu2W3g2BHdTqw3G77iX+15Kgv3B6/hXAfdxii1Q740OP98dczTSjZxA1fzVKbVo/ODvmflw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5159 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] net/enic: fix segfault caused by changing MTU X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 10/26/2021 1:02 AM, Hyong Youb Kim wrote: > Changing MTU after the device start causes a segfault in the Rx > handler. The MTU handler (enic_set_mtu) performs the following steps. > 1. Stop NIC Rx > 2. Change Rx handler '(struct rte_eth_dev)->rx_pkt_burst' to > the dummy handler and sleep a while to quiesce > 3. Re-allocate/initialize Rx structures > 4. Change Rx handler back to the real handler > (e.g. enic_noscatter_recv_pkts) > > enic_set_mtu does not update the recently introduced fast-path pointer > '(struct rte_eth_fp_ops)->rx_pkt_burst'. Since rte_eth_rx_burst only > uses the fast-path pointer, it keeps invoking the real Rx handler, not > the dummy one set by (2). And, (3) causes a segfault in the real Rx > handler (e.g. dereferencing freed structures). > > Fix the segfault by updating the fast-path pointer as well. > > Fixes: c87d435a4d79 ("ethdev: copy fast-path API into separate structure") > > Signed-off-by: Hyong Youb Kim > Reviewed-by: John Daley Applied to dpdk-next-net/main, thanks.