From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92592C43381 for ; Tue, 26 Mar 2019 17:40:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5D8522070D for ; Tue, 26 Mar 2019 17:40:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="r/w7VG99" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731509AbfCZRku (ORCPT ); Tue, 26 Mar 2019 13:40:50 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:41414 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726258AbfCZRkt (ORCPT ); Tue, 26 Mar 2019 13:40:49 -0400 Received: by mail-pg1-f194.google.com with SMTP id f6so4459569pgs.8 for ; Tue, 26 Mar 2019 10:40:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=B2ixjtVBxc5JtQQZfKnoKM6S7UeKEGQTjIdHXfuMAwc=; b=r/w7VG99kPEIpcpx0eYR2F+ASa7Ap8UVMpiam9sIvnkQLns825j1Wj91GQBeTREhOr AW12if/Lyxyj6rrpl0F3oJw2oEUyrPhrBRhDeF/ylahpUhLaNxxElIdq9LGcHP6ysKEm v+1AmWxJmbKk8q0EWueh+2E+8MssS/LP3t2bJ+gxR34oAm6D/4WShUGAFFHqcFvOB/z9 bekuObS69pULW06Rkyxa+Tu4JAF3gXigTgssZurH+tWySL5NB5129fQ60eR9XzOUpk63 U6tl1oQLefk+FtL8juuaB1tSZdyGx025aFId+EpwK0Bl6VQXVtjXkoKHRnl7VVUvjt9m Pavg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=B2ixjtVBxc5JtQQZfKnoKM6S7UeKEGQTjIdHXfuMAwc=; b=ShufoSYpDlhzljy7QtqxXbRaRgzdJmNuwwpLfz6YQPyWG9jrNtADGlzYJsi+ZJeHiD SWVhMKki/g2Izj2fAy462ZUBVeAaIKudnp+QLbQjwL9V5BVuco9Scy4EgsGEee2HDbCq Mzn2kF8ZtQwo8ElDIiqYcI9uVwFFt/gyLlbZexD6J+Fu0ipFSvEF09lzhbOORHUJIxFT f0QHacsqVvlrU9HKQwisFd/+YPXok7BmbX3JqbDyvYimtAHKcHOG9aUncnUC5RMi5hy0 /XpM5SO5d9kFrGGKw73yWElrJdCREJyZyeikdJhuC6IuOFh4By3O4SBsBO/q8h7JmiFt lHkA== X-Gm-Message-State: APjAAAUEwQ0cDQtk31iv6r+p3yP0Sb9z4wj8ZgyyHWQswFDxOb7twUrk JWYXGl4s9Igz2RVbO4KLtro= X-Google-Smtp-Source: APXvYqznJpopfC2vF+ZzQP2HEilD8BPGk0utZAYdynxnCtmvGeYHdxOJ4XzHZatpjMWL1kzjMLzq6Q== X-Received: by 2002:a62:1187:: with SMTP id 7mr30704952pfr.119.1553622049178; Tue, 26 Mar 2019 10:40:49 -0700 (PDT) Received: from [192.168.0.24] (97-115-83-152.ptld.qwest.net. [97.115.83.152]) by smtp.gmail.com with ESMTPSA id u15sm29301017pfm.163.2019.03.26.10.40.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Mar 2019 10:40:48 -0700 (PDT) Subject: Re: [PATCH v2 net-next] net: openvswitch: Add a new action check_pkt_len To: Pravin Shelar , Numan Siddique Cc: Linux Kernel Network Developers , ovs dev , Ben Pfaff References: <20190326004346.8784-1-nusiddiq@redhat.com> From: Gregory Rose Message-ID: <5a7ddc47-468d-2ecd-38cc-e4163734a792@gmail.com> Date: Tue, 26 Mar 2019 10:40:46 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 3/26/2019 9:31 AM, Pravin Shelar wrote: > On Mon, Mar 25, 2019 at 5:44 PM wrote: >> From: Numan Siddique >> >> This patch adds a new action - 'check_pkt_len' which checks the >> packet length and executes a set of actions if the packet >> length is greater than the specified length or executes >> another set of actions if the packet length is lesser or equal to. >> >> This action takes below nlattrs >> * OVS_CHECK_PKT_LEN_ATTR_PKT_LEN - 'pkt_len' to check for >> >> * OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER - Nested actions >> to apply if the packet length is greater than the specified 'pkt_len' >> >> * OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL - Nested >> actions to apply if the packet length is lesser or equal to the >> specified 'pkt_len'. >> >> The main use case for adding this action is to solve the packet >> drops because of MTU mismatch in OVN virtual networking solution. >> When a VM (which belongs to a logical switch of OVN) sends a packet >> destined to go via the gateway router and if the nic which provides >> external connectivity, has a lesser MTU, OVS drops the packet >> if the packet length is greater than this MTU. >> >> With the help of this action, OVN will check the packet length >> and if it is greater than the MTU size, it will generate an >> ICMP packet (type 3, code 4) and includes the next hop mtu in it >> so that the sender can fragment the packets. >> >> Reported-at: >> https://mail.openvswitch.org/pipermail/ovs-discuss/2018-July/047039.html >> Suggested-by: Ben Pfaff >> Signed-off-by: Numan Siddique >> CC: Gregory Rose >> CC: Pravin B Shelar >> --- >> v1 -> v2 >> ----- >> * Addressed the review comments. >> - Removed the vlan-tag length when checking the packet length >> - Reordered the netlink attributes >> - Changed the comments to use 'attribute' instead of 'action' >> >> Corresponding OVS patch (submitted as RFC for now) which makes use of this action can be >> found here - https://patchwork.ozlabs.org/patch/1059081/ >> > Looks good to me. > Acked-by: Pravin B Shelar Tested-by: Greg Rose Reviewed-by: Greg Rose