mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-09 16:12:21 +00:00
openvswitch: use hard_header_len instead of hardcoded ETH_HLEN
On tx, use hard_header_len while deciding whether to refragment or drop the packet. That way, all combinations are calculated correctly: * L2 packet going to L2 interface (the L2 header len is subtracted), * L2 packet going to L3 interface (the L2 header is included in the packet lenght), * L3 packet going to L3 interface. Signed-off-by: Jiri Benc <jbenc@redhat.com> Acked-by: Pravin B Shelar <pshelar@ovn.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c540594f86
commit
738314a084
2 changed files with 8 additions and 5 deletions
|
@ -791,7 +791,8 @@ static void do_output(struct datapath *dp, struct sk_buff *skb, int out_port,
|
|||
pskb_trim(skb, ETH_HLEN);
|
||||
}
|
||||
|
||||
if (likely(!mru || (skb->len <= mru + ETH_HLEN))) {
|
||||
if (likely(!mru ||
|
||||
(skb->len <= mru + vport->dev->hard_header_len))) {
|
||||
ovs_vport_send(vport, skb);
|
||||
} else if (mru <= vport->dev->mtu) {
|
||||
struct net *net = read_pnet(&dp->net);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue