From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] erspan: auto detect truncated packets. Date: Mon, 30 Apr 2018 11:44:10 -0400 (EDT) Message-ID: <20180430.114410.1341893433757519940.davem@davemloft.net> References: <1524863792-66068-1-git-send-email-u9012063@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: u9012063@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:33284 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753582AbeD3PoM (ORCPT ); Mon, 30 Apr 2018 11:44:12 -0400 In-Reply-To: <1524863792-66068-1-git-send-email-u9012063@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: William Tu Date: Fri, 27 Apr 2018 14:16:32 -0700 > Currently the truncated bit is set only when the mirrored packet > is larger than mtu. For certain cases, the packet might already > been truncated before sending to the erspan tunnel. In this case, > the patch detect whether the IP header's total length is larger > than the actual skb->len. If true, this indicated that the > mirrored packet is truncated and set the erspan truncate bit. > > I tested the patch using bpf_skb_change_tail helper function to > shrink the packet size and send to erspan tunnel. > > Reported-by: Xiaoyan Jin > Signed-off-by: William Tu Applied, thanks.