From patchwork Thu Nov 4 21:47:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: stephen hemminger X-Patchwork-Id: 70172 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id D8BCDB70A9 for ; Fri, 5 Nov 2010 08:47:15 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753194Ab0KDVrJ (ORCPT ); Thu, 4 Nov 2010 17:47:09 -0400 Received: from mail.vyatta.com ([76.74.103.46]:52695 "EHLO mail.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753124Ab0KDVrI (ORCPT ); Thu, 4 Nov 2010 17:47:08 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.vyatta.com (Postfix) with ESMTP id 44ACA1829183; Thu, 4 Nov 2010 14:47:08 -0700 (PDT) X-Virus-Scanned: amavisd-new at tahiti.vyatta.com Received: from mail.vyatta.com ([127.0.0.1]) by localhost (mail.vyatta.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G2CDnljtv2W1; Thu, 4 Nov 2010 14:47:07 -0700 (PDT) Received: from s6510 (unknown [12.157.84.42]) by mail.vyatta.com (Postfix) with ESMTPSA id 4C577182917C; Thu, 4 Nov 2010 14:47:07 -0700 (PDT) Date: Thu, 4 Nov 2010 17:47:04 -0400 From: Stephen Hemminger To: David Miller Cc: netdev@vger.kernel.org Subject: [PATCH] classifier: report statistics for basic classifier Message-ID: <20101104174704.573c52e4@s6510> Organization: Vyatta X-Mailer: Claws Mail 3.7.6 (GTK+ 2.22.0; i486-pc-linux-gnu) Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The basic classifier keeps statistics but does not report it to user space. This showed up when using basic classifier (with police) as a default catch all on ingress; no statistics were reported. Signed-off-by: Stephen Hemminger --- I consider this a bug and should go into net-2.6 but not stable. net/sched/cls_basic.c | 4 ++++ 1 file changed, 4 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/net/sched/cls_basic.c 2010-11-04 16:06:19.984953193 -0400 +++ b/net/sched/cls_basic.c 2010-11-04 16:06:42.248953192 -0400 @@ -268,6 +268,10 @@ static int basic_dump(struct tcf_proto * goto nla_put_failure; nla_nest_end(skb, nest); + + if (tcf_exts_dump_stats(skb, &f->exts, &basic_ext_map) < 0) + goto nla_put_failure; + return skb->len; nla_put_failure: