Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754247AbdGJPpt (ORCPT ); Mon, 10 Jul 2017 11:45:49 -0400 Received: from smtprelay0216.hostedemail.com ([216.40.44.216]:37593 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753556AbdGJPpr (ORCPT ); Mon, 10 Jul 2017 11:45:47 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2194:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3870:3871:3872:3874:4321:5007:7576:8603:9545:10004:10400:10848:11026:11473:11658:11914:12043:12296:12438:12740:12760:12895:13069:13095:13311:13357:13439:14181:14659:14721:21080:21433:21451:21627:30012:30054:30063:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: trip03_4f4796a998c4b X-Filterd-Recvd-Size: 2234 Message-ID: <1499701543.5468.11.camel@perches.com> Subject: Re: [PATCH] net/mlx5: IPSec, fix 64-bit division correctly From: Joe Perches To: Ilan Tayari , Arnd Bergmann , Saeed Mahameed Cc: Matan Barak , Leon Romanovsky , Yossi Kuperman , Yevgeny Kliteynik , Boris Pismenny , "netdev@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" Date: Mon, 10 Jul 2017 08:45:43 -0700 In-Reply-To: References: <20170710093842.2921914-1-arnd@arndb.de> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 953 Lines: 27 On Mon, 2017-07-10 at 10:24 +0000, Ilan Tayari wrote: > > -----Original Message----- > > From: Arnd Bergmann [mailto:arnd@arndb.de] > > Subject: [PATCH] net/mlx5: IPSec, fix 64-bit division correctly > > > > The new IPSec offload code introduced a build error: > > > > drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.o: In function > > `mlx5e_ipsec_build_inverse_table': > > ipsec_rxtx.c:(.text+0x556): undefined reference > > > > Another patch was added on top to fix the build error, but > > that introduced a new bug, as we now use the remainder of > > the division rather than the result. Is it possible to return noise in mlx5e_ipsec_mss_inv ? What clamps skb_shinfo(skb)->gso_size to MAX_LSO (the size of inverse_table)? #define MAX_LSO_MSS 2048 static __be16 mlx5e_ipsec_inverse_table[MAX_LSO_MSS]; static inline __be16 mlx5e_ipsec_mss_inv(struct sk_buff *skb) { return mlx5e_ipsec_inverse_table[skb_shinfo(skb)->gso_size]; }