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 B5F38CCA473 for ; Tue, 21 Jun 2022 19:26:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353545AbiFUT0z (ORCPT ); Tue, 21 Jun 2022 15:26:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353814AbiFUT0y (ORCPT ); Tue, 21 Jun 2022 15:26:54 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1A041144 for ; Tue, 21 Jun 2022 12:26:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 68B3EB81A70 for ; Tue, 21 Jun 2022 19:26:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E227DC341C4; Tue, 21 Jun 2022 19:26:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655839611; bh=+cKuuJupI2e3zPH+ImhJf1LTdLOCdaQ0VQG/OfxskyA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BovcSjSNSm4hk5pZOXjMnfD+lbTuBpNomfAg5pMEZ4Luj+DOFnCFyK086VfNwBUtp cxmfxOsjzVwfStZQmZNsvz3bKXfeu6W9DvBSSmFCY5oyN5KPu+br4OILjZ/lTjLLQz +7OHPR141yL54T1kuD7nPaKs4gWHvEL+ZGTdBeETvfUrjD/0qweZpY5Im/QD8pBEhW pC/cCoHLKuKciBiyLl7weOjPgV9TxtH60eKazQTRiWdKxAn2XlUpb7aIh7gEdM9JEF C4WZiqwTPOpg3AoX8l6jHdz8M2c8AtsZfqUh6zEwlTYnZIushsxukoKnbiPS3qn7wB BWfHTFu8AqhUg== Date: Tue, 21 Jun 2022 12:26:41 -0700 From: Jakub Kicinski To: Lior Nahmanson Cc: Paolo Abeni , "edumazet@google.com" , "davem@davemloft.net" , "netdev@vger.kernel.org" , Raed Salem , Jiri Pirko , Ben Ben Ishay Subject: Re: [PATCH net-next v3 2/3] net/macsec: Add MACsec skb extension Rx Data path support Message-ID: <20220621122641.3cba3d38@kernel.org> In-Reply-To: References: <20220613111942.12726-1-liorna@nvidia.com> <20220613111942.12726-3-liorna@nvidia.com> <20220614091438.3d0665d9@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, 21 Jun 2022 12:39:23 +0000 Lior Nahmanson wrote: > > Shooting from the hip a little bit, but macsec being a tightly bound L2 upper > > maybe metadata dst is a workable solution for carrying the sci and offload > > status between upper and lower? The range of values should be well known > > and limited. > > Under the assumption that by skb_metadata you meant metadata_dst, Can you show me in my email where I said skb_metadata? > I think there are few reasons why i think is better to use skb extensions: > > 1. Unlike skb extension, the metadata_dst deallaction is handled directly by the allocator. > Since the sci and offloaded fields are shared between the MACsec driver and the offload driver > (in our case mlx5 driver), for Rx, the metadata_dst allocation is done in the mlx5 driver, > while the dealloction should be done in the MACsec driver. > This is undesired behavior. You allocate metadata skb once and then attach it to the skbs. > 2. medadata_dst is attached to the skb using skb_dst_set(), which set the slow_gro bit. > So there is no gain regarding slow_gro flow. > > 3. metadata_dst allocation require much more memory than needed for MACsec use case > (mainly because struct dst_entry which seems redundant for this case).