Subject: Re: [PATCH net-next v3 2/3] net/macsec: Add MACsec skb extension Rx Data path support

From: Jakub Kicinski <[email-masked]>
Date: Tue, 12 Jul 2022 17:01:59 -0700

On Tue, 12 Jul 2022 06:50:52 +0000 Lior Nahmanson wrote:
> i considered the usage of skb_metadata_dst, however i still think
> that skb_ext will fit more to MACsec offload implementation for the following reasons:
> 1. for Rx, each skb can have a different SCI and offloaded values which mandate allocation
>     of metadata_dst for each skb which contradicts the desired usage for skb_metadata_dst where
>     it's allocated once and a refcnt held whenever used.

How many distinct SCIs do you expect to see?

> 2. skb_ext method is used in a similar IPsec offload implementation which in the future could make it easier
>     to refactor this section to unify all crypto offloads skb_ext usage.

MACSec is L2, IPsec has constraints we have to work around.