[Devel] [PATCH RHEL7 COMMIT] net/veth: NETIF_F_VENET hunk for RH7.3 rebase

Konstantin Khorenko khorenko at virtuozzo.com
Mon Nov 7 06:03:32 PST 2016


The commit is pushed to "branch-rh7-3.10.0-493.vz7.25.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-493.el7
------>
commit e30b666e2ad07b0267bcef670fec1095ff4a31bd
Author: Dmitry Safonov <dsafonov at virtuozzo.com>
Date:   Mon Nov 7 18:03:32 2016 +0400

    net/veth: NETIF_F_VENET hunk for RH7.3 rebase
    
    Hunk:
    # --- a/net/bridge/br_forward.c
    # +++ b/net/bridge/br_forward.c
    # @@ -44,7 +44,8 @@ int br_dev_queue_push_xmit(struct sock *sk, struct sk_buff *skb)
    #    {
    #           /* ip_fragment doesn't copy the MAC header */
    #           if (nf_bridge_maybe_copy_header(skb) ||
    # -           (packet_length(skb) > skb->dev->mtu && !skb_is_gso(skb))) {
    # +           (!(skb->dev->features & NETIF_F_VENET) &&
    # +            packet_length(skb) > skb->dev->mtu && !skb_is_gso(skb))) {
    #                   kfree_skb(skb);
    #           } else {
    #                   skb_push(skb, ETH_HLEN);
    
    is_skb_forwardable() now checks packet length and GSO enabling.
    Not interested in package size for veth forwarding - don't drop.
    
    To be merged into commit 53dba9e212cc3f440acc60a8d333df3967931937
    ("Initial patch commit + compilation fixes").
    
    https://jira.sw.ru/browse/PSBM-54819
    
    Cc: Andrei Vagin <avagin at virtuozzo.com>
    Cc: Kirill Tkhai <ktkhai at virtuozzo.com>
    Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
 net/bridge/br_forward.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c
index 5962f6f..e04576e 100644
--- a/net/bridge/br_forward.c
+++ b/net/bridge/br_forward.c
@@ -42,7 +42,8 @@ static inline unsigned int packet_length(const struct sk_buff *skb)
 
 int br_dev_queue_push_xmit(struct sock *sk, struct sk_buff *skb)
 {
-	if (!is_skb_forwardable(skb->dev, skb))
+	if (!(skb->dev->features & NETIF_F_VENET) &&
+	    !is_skb_forwardable(skb->dev, skb))
 		goto drop;
 
 	skb_push(skb, ETH_HLEN);


More information about the Devel mailing list