Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752621AbdLAGVL (ORCPT ); Fri, 1 Dec 2017 01:21:11 -0500 Received: from a.mx.secunet.com ([62.96.220.36]:41748 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751986AbdLAGVK (ORCPT ); Fri, 1 Dec 2017 01:21:10 -0500 Date: Fri, 1 Dec 2017 07:21:08 +0100 From: Steffen Klassert To: CC: "David S. Miller" , Herbert Xu , , , , , Subject: Re: [PATCH net-next 2/3] xfrm: Fix xfrm_dev_state_add to fail for unsupported HW SA option Message-ID: <20171201062108.mrpesivmzmpjjbk4@gauss3.secunet.de> References: <1511862571-3494-1-git-send-email-yossefe@mellanox.com> <1511862571-3494-2-git-send-email-yossefe@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1511862571-3494-2-git-send-email-yossefe@mellanox.com> User-Agent: NeoMutt/20170609 (1.8.3) X-G-Data-MailSecurity-for-Exchange-State: 0 X-G-Data-MailSecurity-for-Exchange-Error: 0 X-G-Data-MailSecurity-for-Exchange-Sender: 23 X-G-Data-MailSecurity-for-Exchange-Server: d65e63f7-5c15-413f-8f63-c0d707471c93 X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 X-G-Data-MailSecurity-for-Exchange-Guid: 1A5647DD-1DC4-4C67-B6F4-4D1263A2EB64 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 832 Lines: 19 On Tue, Nov 28, 2017 at 11:49:29AM +0200, yossefe@mellanox.com wrote: > From: Yossef Efraim > > xfrm_dev_state_add function returns success for unsupported HW SA options. > Resulting the calling function to create SW SA without corrlating HW SA. > Desipte IPSec device offloading option was chosen. > These not supported HW SA options are hard coded within xfrm_dev_state_add > function. > SW backward compatibility will break if we add any of these option as old > HW will fail with new SW. > > This patch changes the behaviour to return -EINVAL in case unsupported > option is chosen. > Notifying user application regarding failure and not breaking backward > compatibility for newly added HW SA options. > > Signed-off-by: Yossef Efraim Also applied to ipsec-next, thanks a lot!