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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 EE6D0C31E40 for ; Tue, 6 Aug 2019 21:06:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C044220C01 for ; Tue, 6 Aug 2019 21:06:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726412AbfHFVGv (ORCPT ); Tue, 6 Aug 2019 17:06:51 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:49806 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726044AbfHFVGu (ORCPT ); Tue, 6 Aug 2019 17:06:50 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 146A61265AA8B; Tue, 6 Aug 2019 14:06:50 -0700 (PDT) Date: Tue, 06 Aug 2019 14:06:49 -0700 (PDT) Message-Id: <20190806.140649.288630570722100962.davem@davemloft.net> To: mrv@mojatatu.com Cc: netdev@vger.kernel.org, kernel@mojatatu.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us Subject: Re: [PATCH net 0/2] Fix batched event generation for vlan action From: David Miller In-Reply-To: <1564773407-26209-1-git-send-email-mrv@mojatatu.com> References: <1564773407-26209-1-git-send-email-mrv@mojatatu.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 06 Aug 2019 14:06:50 -0700 (PDT) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Roman Mashak Date: Fri, 2 Aug 2019 15:16:45 -0400 > When adding or deleting a batch of entries, the kernel sends up to > TCA_ACT_MAX_PRIO (defined to 32 in kernel) entries in an event to user > space. However it does not consider that the action sizes may vary and > require different skb sizes. > > For example, consider the following script adding 32 entries with all > supported vlan parameters (in order to maximize netlink messages size): > > % cat tc-batch.sh > TC="sudo /mnt/iproute2.git/tc/tc" > > $TC actions flush action vlan > for i in `seq 1 $1`; > do > cmd="action vlan push protocol 802.1q id 4094 priority 7 pipe \ > index $i cookie aabbccddeeff112233445566778800a1 " > args=$args$cmd > done > $TC actions add $args > % > % ./tc-batch.sh 32 > Error: Failed to fill netlink attributes while adding TC action. > We have an error talking to the kernel > % > > patch 1 adds callback in tc_action_ops of vlan action, which calculates > the action size, and passes size to tcf_add_notify()/tcf_del_notify(). > > patch 2 updates the TDC test suite with relevant vlan test cases. Series applied and patch #1 queued up for -stable.