diff options
author | Jason Wang <jasowang@redhat.com> | 2017-05-17 07:14:42 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-18 17:07:41 +0300 |
commit | 49f96fd0cb3808e5ff96573f28b3dceb16eb6998 (patch) | |
tree | 8813625dcfe4369f90f3b6018131876195a0640c /drivers/net/tap.c | |
parent | 83339c6b159ea6429a1db40b0d9d1083ab574733 (diff) | |
download | linux-49f96fd0cb3808e5ff96573f28b3dceb16eb6998.tar.xz |
tap: export skb_array
This patch exports skb_array through tap_get_skb_array(). Caller can
then manipulate skb array directly.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tap.c')
-rw-r--r-- | drivers/net/tap.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/tap.c b/drivers/net/tap.c index 4d4173d25dd0..abdaf867774d 100644 --- a/drivers/net/tap.c +++ b/drivers/net/tap.c @@ -1193,6 +1193,19 @@ struct socket *tap_get_socket(struct file *file) } EXPORT_SYMBOL_GPL(tap_get_socket); +struct skb_array *tap_get_skb_array(struct file *file) +{ + struct tap_queue *q; + + if (file->f_op != &tap_fops) + return ERR_PTR(-EINVAL); + q = file->private_data; + if (!q) + return ERR_PTR(-EBADFD); + return &q->skb_array; +} +EXPORT_SYMBOL_GPL(tap_get_skb_array); + int tap_queue_resize(struct tap_dev *tap) { struct net_device *dev = tap->dev; |