|
@@ -1185,13 +1185,13 @@ struct dev_ifalias {
|
|
* This function is used to set or query state related to XDP on the
|
|
* This function is used to set or query state related to XDP on the
|
|
* netdevice and manage BPF offload. See definition of
|
|
* netdevice and manage BPF offload. See definition of
|
|
* enum bpf_netdev_command for details.
|
|
* enum bpf_netdev_command for details.
|
|
- * int (*ndo_xdp_xmit)(struct net_device *dev, int n, struct xdp_frame **xdp);
|
|
|
|
|
|
+ * int (*ndo_xdp_xmit)(struct net_device *dev, int n, struct xdp_frame **xdp,
|
|
|
|
+ * u32 flags);
|
|
* This function is used to submit @n XDP packets for transmit on a
|
|
* This function is used to submit @n XDP packets for transmit on a
|
|
* netdevice. Returns number of frames successfully transmitted, frames
|
|
* netdevice. Returns number of frames successfully transmitted, frames
|
|
* that got dropped are freed/returned via xdp_return_frame().
|
|
* that got dropped are freed/returned via xdp_return_frame().
|
|
* Returns negative number, means general error invoking ndo, meaning
|
|
* Returns negative number, means general error invoking ndo, meaning
|
|
* no frames were xmit'ed and core-caller will free all frames.
|
|
* no frames were xmit'ed and core-caller will free all frames.
|
|
- * TODO: Consider add flag to allow sending flush operation.
|
|
|
|
* void (*ndo_xdp_flush)(struct net_device *dev);
|
|
* void (*ndo_xdp_flush)(struct net_device *dev);
|
|
* This function is used to inform the driver to flush a particular
|
|
* This function is used to inform the driver to flush a particular
|
|
* xdp tx queue. Must be called on same CPU as xdp_xmit.
|
|
* xdp tx queue. Must be called on same CPU as xdp_xmit.
|
|
@@ -1380,7 +1380,8 @@ struct net_device_ops {
|
|
int (*ndo_bpf)(struct net_device *dev,
|
|
int (*ndo_bpf)(struct net_device *dev,
|
|
struct netdev_bpf *bpf);
|
|
struct netdev_bpf *bpf);
|
|
int (*ndo_xdp_xmit)(struct net_device *dev, int n,
|
|
int (*ndo_xdp_xmit)(struct net_device *dev, int n,
|
|
- struct xdp_frame **xdp);
|
|
|
|
|
|
+ struct xdp_frame **xdp,
|
|
|
|
+ u32 flags);
|
|
void (*ndo_xdp_flush)(struct net_device *dev);
|
|
void (*ndo_xdp_flush)(struct net_device *dev);
|
|
};
|
|
};
|
|
|
|
|