19 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
21 #include <linux/if_arp.h>
22 #include <linux/if_bridge.h>
23 #include <linux/if_vlan.h>
24 #include <linux/kernel.h>
25 #include <linux/llc.h>
26 #include <linux/rtnetlink.h>
66 netdev_port_receive(vport, skb);
84 netdev_vport = netdev_vport_priv(vport);
87 if (!netdev_vport->
dev) {
89 goto error_free_vport;
110 dev_put(netdev_vport->
dev);
117 static void netdev_destroy(
struct vport *vport)
119 struct netdev_vport *netdev_vport = netdev_vport_priv(vport);
127 dev_put(netdev_vport->
dev);
133 const struct netdev_vport *netdev_vport = netdev_vport_priv(vport);
134 return netdev_vport->
dev->name;
139 const struct netdev_vport *netdev_vport = netdev_vport_priv(vport);
140 return netdev_vport->
dev->ifindex;
143 static unsigned int packet_length(
const struct sk_buff *skb)
153 static int netdev_send(
struct vport *vport,
struct sk_buff *skb)
155 struct netdev_vport *netdev_vport = netdev_vport_priv(vport);
156 int mtu = netdev_vport->
dev->mtu;
159 if (
unlikely(packet_length(skb) > mtu && !skb_is_gso(skb))) {
161 netdev_vport->
dev->name,
162 packet_length(skb), mtu);
169 skb->
dev = netdev_vport->
dev;
185 return (
struct vport *)
193 .create = netdev_create,
194 .destroy = netdev_destroy,