@@ -3393,6 +3393,21 @@ static inline netdev_tx_t netdev_start_xmit(struct sk_buff *skb, struct net_devi
return __netdev_start_xmit(ops, skb, dev);
}
+static inline netdev_tx_t __netdev_xmit_only(struct sk_buff *skb, struct net_device *dev)
+{
+ const struct net_device_ops *ops = dev->netdev_ops;
+
+ return ops->ndo_start_xmit(skb, dev);
+}
+
+static inline void __netdev_xmit_flush(struct net_device *dev, u16 queue)
+{
+ const struct net_device_ops *ops = dev->netdev_ops;
+
+ if (ops->ndo_xmit_flush)
+ ops->ndo_xmit_flush(dev, queue);
+}
+
int netdev_class_create_file_ns(struct class_attribute *class_attr,
const void *ns);
void netdev_class_remove_file_ns(struct class_attribute *class_attr,
This adds two helpers to use xmit and flushing separately from each other as opposed to netdev_start_xmit(). Signed-off-by: Daniel Borkmann <dborkman@redhat.com> --- include/linux/netdevice.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+)