Re: [RFC net-next v2 2/5] net: macsec: introduce mdo_insert_tx_tag

Radu Pirea (OSS)
2023-08-25T10:01:33Z

On 24.08.2023 17:54, Sabrina Dubroca wrote:
> 2023-08-24, 12:16:12 +0300, Radu Pirea (NXP OSS) wrote:
>
>> +
>> + if (macsec_is_offloaded(macsec)) {
>
> Shouldn't that whole adjustment (in both directions) depend on
> ->insert_tx_tag?

I asked myself the same thing and the answer was "It depends". This
adjustment can be restricted only to the offloaded MACsec devs that
require a special TX tag. However, the offloaded MACsec devs do not need
additional headroom/tailroom.
>> +
>> + if (!macsec->insert_tx_tag)
>> + return skb;
>
> I think it would look a bit nicer if this test was moved out, before
> calling insert_tx_tag(). Then if we call insert_tx_tag(), we know we
> have to insert it.
>

I expected this suggestion :)

--
Radu P.