6868 * - netif_rx() feedback
6969 */
7070
71+ /* #ifdef CONFIG_XDPLUA */
72+ #include <lua.h>
73+ #include <lauxlib.h>
74+ #include <lualib.h>
75+ /* #endif CONFIG_XDPLUA */
76+
7177#include <linux/uaccess.h>
7278#include <linux/bitops.h>
7379#include <linux/capability.h>
143149#include <linux/indirect_call_wrapper.h>
144150#include <net/devlink.h>
145151
146- #ifdef CONFIG_XDPLUA
147- #include <lua.h>
148- #include <lauxlib.h>
149- #include <lualib.h>
150- #endif /* CONFIG_XDPLUA */
151-
152152#include "net-sysfs.h"
153153
154154#define MAX_GRO_SKBS 8
@@ -170,9 +170,9 @@ static int call_netdevice_notifiers_extack(unsigned long val,
170170 struct netlink_ext_ack * extack );
171171static struct napi_struct * napi_by_id (unsigned int napi_id );
172172
173- #ifdef CONFIG_XDPLUA
173+ /* #ifdef CONFIG_XDPLUA */
174174struct list_head lua_state_cpu_list ;
175- #endif /* CONFIG_XDPLUA */
175+ /* #endif CONFIG_XDPLUA */
176176
177177/*
178178 * The @dev_base_head list is protected by @dev_base_lock and the rtnl
@@ -4381,9 +4381,9 @@ static u32 netif_receive_generic_xdp(struct sk_buff *skb,
43814381
43824382 rxqueue = netif_get_rxqueue (skb );
43834383 xdp -> rxq = & rxqueue -> xdp_rxq ;
4384- #ifdef CONFIG_XDPLUA
4384+ /* #ifdef CONFIG_XDPLUA */
43854385 xdp -> skb = skb ;
4386- #endif /* CONFIG_XDPLUA */
4386+ /* #endif CONFIG_XDPLUA */
43874387
43884388 act = bpf_prog_run_xdp (xdp_prog , xdp );
43894389
@@ -5196,7 +5196,7 @@ static int generic_xdp_install(struct net_device *dev, struct netdev_bpf *xdp)
51965196 return ret ;
51975197}
51985198
5199- #ifdef CONFIG_XDPLUA
5199+ /* #ifdef CONFIG_XDPLUA */
52005200int generic_xdp_lua_install_prog (char * lua_prog )
52015201{
52025202 struct lua_state_cpu * sc ;
@@ -5210,7 +5210,7 @@ int generic_xdp_lua_install_prog(char *lua_prog)
52105210 }
52115211 return 0 ;
52125212}
5213- #endif /* CONFIG_XDPLUA */
5213+ /* #endif CONFIG_XDPLUA */
52145214
52155215static int netif_receive_skb_internal (struct sk_buff * skb )
52165216{
@@ -9829,9 +9829,9 @@ static struct pernet_operations __net_initdata default_device_ops = {
98299829static int __init net_dev_init (void )
98309830{
98319831 int i , rc = - ENOMEM ;
9832- #ifdef CONFIG_XDPLUA
9832+ /* #ifdef CONFIG_XDPLUA */
98339833 struct lua_state_cpu * new_state_cpu ;
9834- #endif /* CONFIG_XDPLUA */
9834+ /* #endif CONFIG_XDPLUA */
98359835
98369836 BUG_ON (!dev_boot_phase );
98379837
@@ -9846,9 +9846,9 @@ static int __init net_dev_init(void)
98469846 INIT_LIST_HEAD (& ptype_base [i ]);
98479847
98489848 INIT_LIST_HEAD (& offload_base );
9849- #ifdef CONFIG_XDPLUA
9849+ /* #ifdef CONFIG_XDPLUA */
98509850 INIT_LIST_HEAD (& lua_state_cpu_list );
9851- #endif /* CONFIG_XDPLUA */
9851+ /* #endif CONFIG_XDPLUA */
98529852
98539853 if (register_pernet_subsys (& netdev_net_ops ))
98549854 goto out ;
@@ -9880,9 +9880,9 @@ static int __init net_dev_init(void)
98809880 sd -> backlog .poll = process_backlog ;
98819881 sd -> backlog .weight = weight_p ;
98829882
9883- #ifdef CONFIG_XDPLUA
9883+ /* #ifdef CONFIG_XDPLUA */
98849884 new_state_cpu = (struct lua_state_cpu * )
9885- kmalloc (sizeof (lua_state_cpu ), GFP_ATOMIC );
9885+ kmalloc (sizeof (struct lua_state_cpu ), GFP_ATOMIC );
98869886 if (!new_state_cpu )
98879887 continue ;
98889888
@@ -9893,12 +9893,11 @@ static int __init net_dev_init(void)
98939893 }
98949894
98959895 luaL_openlibs (new_state_cpu -> L );
9896- luaL_requiref (new_state_cpu -> L , "data" , luaopen_data , 1 );
98979896 lua_pop (new_state_cpu -> L , 1 );
98989897 new_state_cpu -> cpu = i ;
98999898
99009899 list_add (& new_state_cpu -> list , & lua_state_cpu_list );
9901- #endif /* CONFIG_XDPLUA */
9900+ /* #endif CONFIG_XDPLUA */
99029901 }
99039902
99049903 dev_boot_phase = 0 ;
0 commit comments