The driver type need to be checked in private API.
Fixes:
50556c88104c ("net/ixgbe: fix MACsec setting")
Cc: stable@dpdk.org
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
dev = &rte_eth_devices[port];
+ if (!is_ixgbe_supported(dev))
+ return -ENOTSUP;
+
macsec_setting.offload_en = 1;
macsec_setting.encrypt_en = en;
macsec_setting.replayprotect_en = rp;
dev = &rte_eth_devices[port];
+ if (!is_ixgbe_supported(dev))
+ return -ENOTSUP;
+
ixgbe_dev_macsec_setting_reset(dev);
ixgbe_dev_macsec_register_disable(dev);