File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -1054,6 +1054,29 @@ static void check_sq_full_and_disable(struct virtnet_info *vi,
1054
1054
}
1055
1055
}
1056
1056
1057
+ static int virtnet_xsk_wakeup (struct net_device * dev , u32 qid , u32 flag )
1058
+ {
1059
+ struct virtnet_info * vi = netdev_priv (dev );
1060
+ struct send_queue * sq ;
1061
+
1062
+ if (!netif_running (dev ))
1063
+ return - ENETDOWN ;
1064
+
1065
+ if (qid >= vi -> curr_queue_pairs )
1066
+ return - EINVAL ;
1067
+
1068
+ sq = & vi -> sq [qid ];
1069
+
1070
+ if (napi_if_scheduled_mark_missed (& sq -> napi ))
1071
+ return 0 ;
1072
+
1073
+ local_bh_disable ();
1074
+ virtqueue_napi_schedule (& sq -> napi , sq -> vq );
1075
+ local_bh_enable ();
1076
+
1077
+ return 0 ;
1078
+ }
1079
+
1057
1080
static int __virtnet_xdp_xmit_one (struct virtnet_info * vi ,
1058
1081
struct send_queue * sq ,
1059
1082
struct xdp_frame * xdpf )
@@ -5399,6 +5422,7 @@ static const struct net_device_ops virtnet_netdev = {
5399
5422
.ndo_vlan_rx_kill_vid = virtnet_vlan_rx_kill_vid ,
5400
5423
.ndo_bpf = virtnet_xdp ,
5401
5424
.ndo_xdp_xmit = virtnet_xdp_xmit ,
5425
+ .ndo_xsk_wakeup = virtnet_xsk_wakeup ,
5402
5426
.ndo_features_check = passthru_features_check ,
5403
5427
.ndo_get_phys_port_name = virtnet_get_phys_port_name ,
5404
5428
.ndo_set_features = virtnet_set_features ,
You can’t perform that action at this time.
0 commit comments