]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
cn10k-ipsec: Enable outbound ipsec crypto offload
authorBharat Bhushan <bbhushan2@marvell.com>
Wed, 4 Dec 2024 05:56:59 +0000 (11:26 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Dec 2024 12:15:31 +0000 (12:15 +0000)
Hardware is initialized and netdev transmit flow is
hooked up for outbound ipsec crypto offload, so finally
enable ipsec offload.

Signed-off-by: Bharat Bhushan <bbhushan2@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c

index e9bf4632695e07b422f56dcd144aa46692c7e770..c333e04daad38670bb396753ca9a5d5bd99274a5 100644 (file)
@@ -821,10 +821,10 @@ int cn10k_ipsec_init(struct net_device *netdev)
                return -ENOMEM;
        }
 
-       /* Set xfrm device ops
-        * NETIF_F_HW_ESP is not set as ipsec setup is not yet complete.
-        */
+       /* Set xfrm device ops */
        netdev->xfrmdev_ops = &cn10k_ipsec_xfrmdev_ops;
+       netdev->hw_features |= NETIF_F_HW_ESP;
+       netdev->hw_enc_features |= NETIF_F_HW_ESP;
 
        cn10k_cpt_device_set_unavailable(pf);
        return 0;