From owner-freebsd-wireless@FreeBSD.ORG Thu Oct 25 21:11:38 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9AA4AB71 for ; Thu, 25 Oct 2012 21:11:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 681EB8FC19 for ; Thu, 25 Oct 2012 21:11:38 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so2461430pbb.13 for ; Thu, 25 Oct 2012 14:11:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=TbHzFOP6Ko0OzOQhOOFtppuvWs9tHDakVocs5rQxS3I=; b=E5JGUU/kKftjmsPRDpwGny+LW9cu6Z4JCnE4DzW1jlyuTwEuO1lGrQiE7RIU9FM3GF Il4L9N5zmGLUtADqsQ1R9ksC0kQGuG1IUuALVrZacfY2RXuONTv2zC1Dh+sUuBl/DR9K wODEA0IKRvNxysQ3zOVjYCbsr7gs3+ILBEgjpEpMb62R2meGv5lGWWEij+OqpaGvadpU vT+YcGiDn7sjw+fNpRCFEm8lvX42a848qF3vs9ex+o2fGwKt7782yhExVlYFm1BL1J+u Y5Be7AdQbYeFTpjnmNkOIOJp4gAtI8uYkiICJJsG7142zPxkucjK8e8pClwufBQDExbG Ivjw== MIME-Version: 1.0 Received: by 10.68.218.226 with SMTP id pj2mr64047506pbc.33.1351199492684; Thu, 25 Oct 2012 14:11:32 -0700 (PDT) Received: by 10.68.146.233 with HTTP; Thu, 25 Oct 2012 14:11:32 -0700 (PDT) In-Reply-To: References: Date: Thu, 25 Oct 2012 14:11:32 -0700 Message-ID: Subject: Re: remove some KASSERT in net80211? From: Adrian Chadd To: Monthadar Al Jaberi , freebsd-wireless@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2012 21:11:38 -0000 cc'ing -wireless, as it's a useful discussion On 21 October 2012 23:27, Monthadar Al Jaberi wrote: > sorry for the looong delay... :( > > generally all packet come trhough ath_rx_pkt() (ath(4)), Right. And that's a taskqueue. > then it seems that ieee80211_input_* are not locked. So different > packets can be handled in the stack the same time? What happens if > Path Error and Path Reply run at almost the same time? Won't it be > undefined behavior? Well, what other RX path is there? It should only be run from the RX taskqueue on ath(4), and thus serialised. There's a few corner cases where that isn't true (notably during reset) which needs to eventually be addressed. > There is the possibility that a timer get down to zero and invalidate, > but that timer is 5 s and it gets updated often so I guess this case > can be ignored. > > We can also invalidate route when we receive Peer Close frame. > > So is this a question of serializing the stack? or am I missing > something important? Well, the RX path is mostly serialised - except for things like channel scanning and any kind of reset. Reset now flushes the RX queue and handles whatever frames were there, but I -believe- I serialised that well enough (reset can't overlap with RX and another reset in parallel.) So, why else is this particular assertion being hit? :) Adrian