Commit 217ac77a authored by Jiri Benc's avatar Jiri Benc Committed by David S. Miller

openvswitch: allow L3 netdev ports

Allow ARPHRD_NONE interfaces to be added to ovs bridge.

Based on previous versions by Lorand Jakab and Simon Horman.
Signed-off-by: default avatarLorand Jakab <lojakab@cisco.com>
Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
Signed-off-by: default avatarJiri Benc <jbenc@redhat.com>
Acked-by: default avatarPravin B Shelar <pshelar@ovn.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 91820da6
...@@ -57,8 +57,10 @@ static void netdev_port_receive(struct sk_buff *skb) ...@@ -57,8 +57,10 @@ static void netdev_port_receive(struct sk_buff *skb)
if (unlikely(!skb)) if (unlikely(!skb))
return; return;
skb_push(skb, ETH_HLEN); if (skb->dev->type == ARPHRD_ETHER) {
skb_postpush_rcsum(skb, skb->data, ETH_HLEN); skb_push(skb, ETH_HLEN);
skb_postpush_rcsum(skb, skb->data, ETH_HLEN);
}
ovs_vport_receive(vport, skb, skb_tunnel_info(skb)); ovs_vport_receive(vport, skb, skb_tunnel_info(skb));
return; return;
error: error:
...@@ -97,7 +99,8 @@ struct vport *ovs_netdev_link(struct vport *vport, const char *name) ...@@ -97,7 +99,8 @@ struct vport *ovs_netdev_link(struct vport *vport, const char *name)
} }
if (vport->dev->flags & IFF_LOOPBACK || if (vport->dev->flags & IFF_LOOPBACK ||
vport->dev->type != ARPHRD_ETHER || (vport->dev->type != ARPHRD_ETHER &&
vport->dev->type != ARPHRD_NONE) ||
ovs_is_internal_dev(vport->dev)) { ovs_is_internal_dev(vport->dev)) {
err = -EINVAL; err = -EINVAL;
goto error_put; goto error_put;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment