From patchwork Wed Oct 2 23:16:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Leblond X-Patchwork-Id: 280192 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 7A6FA2C00B8 for ; Thu, 3 Oct 2013 09:16:50 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753034Ab3JBXQt (ORCPT ); Wed, 2 Oct 2013 19:16:49 -0400 Received: from ks28632.kimsufi.com ([91.121.96.152]:50428 "EHLO ks28632.kimsufi.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752928Ab3JBXQt (ORCPT ); Wed, 2 Oct 2013 19:16:49 -0400 Received: from bayen.regit.org ([81.57.69.189] helo=localhost.localdomain) by ks28632.kimsufi.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1VRVex-0000ie-Qx; Thu, 03 Oct 2013 01:16:48 +0200 From: Eric Leblond To: netfilter-devel@vger.kernel.org Cc: eric@regit.org, pablo@netfilter.org Subject: [nftables PATCH] netlink: use build_id to lower message size Date: Thu, 3 Oct 2013 01:16:33 +0200 Message-Id: <1380755793-18011-1-git-send-email-eric@regit.org> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1380755553.6862.32.camel@tiger2> References: <1380755553.6862.32.camel@tiger2> X-Spam-Score: -2.9 (--) Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org THis patch makes use of the new nft_rule_nlmsg_build_id function from libnftables for the delete operation. This lower the size of the netlink message sent to kernel when flushing the rules. Signed-off-by: Eric Leblond --- src/mnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mnl.c b/src/mnl.c index 27b181a..3c07156 100644 --- a/src/mnl.c +++ b/src/mnl.c @@ -292,7 +292,7 @@ int mnl_nft_rule_batch_del(struct nft_rule *nlr, unsigned int flags, nft_rule_attr_get_u32(nlr, NFT_RULE_ATTR_FAMILY), NLM_F_ACK, seqnum); - nft_rule_nlmsg_build_payload(nlh, nlr); + nft_rule_nlmsg_build_id(nlh, nlr); if (!mnl_nlmsg_batch_next(batch)) mnl_batch_page_add();