--- zzzz-none-000/linux-4.9.276/drivers/net/veth.c 2021-07-20 14:21:16.000000000 +0000 +++ falcon-5530-750/linux-4.9.276/drivers/net/veth.c 2023-04-05 08:19:01.000000000 +0000 @@ -133,7 +133,18 @@ rcu_read_unlock(); return NETDEV_TX_OK; } +#if IS_ENABLED(CONFIG_PPA) +extern int32_t (*ppa_if_ops_veth_xmit_fn)(struct net_device *dev); +static int32_t ppa_if_dev_is_veth(struct net_device *netdev) +{ + int ret = 0; + + ret = (veth_xmit == netdev->netdev_ops->ndo_start_xmit) ? 1 : 0; + + return ret; +} +#endif /* * general routines */ @@ -535,11 +546,17 @@ static __init int veth_init(void) { +#if IS_ENABLED(CONFIG_PPA) + ppa_if_ops_veth_xmit_fn = ppa_if_dev_is_veth; +#endif return rtnl_link_register(&veth_link_ops); } static __exit void veth_exit(void) { +#if IS_ENABLED(CONFIG_PPA) + ppa_if_ops_veth_xmit_fn = NULL; +#endif rtnl_link_unregister(&veth_link_ops); }