Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp387756ybb; Wed, 25 Mar 2020 01:36:55 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtBmZz7xHROo+jmEFDr4GKss2rpwYy1eXX5U39Z3YeQEbL7gzG8+1kwqBafegjkTLNWwNFC X-Received: by 2002:aca:df45:: with SMTP id w66mr1665358oig.76.1585125415848; Wed, 25 Mar 2020 01:36:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585125415; cv=none; d=google.com; s=arc-20160816; b=W4bk08mPUHM4YTkzrR9uscnKf1qB6WgMLgVhJK6+6pe2i9U4jaoecOF3s8UoDIc4Tl L4k4yOdY5NIKd6s9b4pEBq2nrriHAkz137ZlG7fIJi1WbYvRcbcNep70MgCD7BpdVyDL KSpSy2WuVBUTDyuCP587Jtd1Mk40gSWj1T9KOUzvokhTHFbO2zJS/hZBYHGJFDrSYJPm URcLiF/W9eBszvvGWLYy87x73Luwq654CVSUEYx7oZJaAdbRV4eQgQsje3g7niwPDdkf oMg4MY44P3NIxqiT1i+MNvW1EWDs/v7EwF4cQPcZDWvm6hNF0O0v/FCWo7EBA6v0oxRX loCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=qMpWQUOKB2+7jhOW9zg4TqniUe/K5ojEbynO1ytw6G8=; b=LOCTmxPooGMp3QBOkZinj8NMTVcIcUqMRFhpH0NLR+BXzii6ZUFzvxrztXEV47S21R UpVTHbWPbpLrZI9fuXspxbmTwygt7YpLEeVt2kMApy6JTO7N5+cQ9gwzycCL5T5NJO+D +z+XBV1NtCVQSNXYQwvKn+NHJoktpne9nKJhHLpbV9FbrzkhmIEL2nRoUpzxu8Xt/mo8 Uy7FsPqeIp/NpfkzCTXIon9+0GAart1k4kh2Iti+7f8XRzhwxdkmTM2ZBXIReTz6wDip 9us9cmt7tg02MKadXpOrL+rdcrPwr+8XFhwemziTWzKqiUJhlFkq4brfZ9qOWronXrtB 9hUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q206si10706266oig.71.2020.03.25.01.36.44; Wed, 25 Mar 2020 01:36:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727320AbgCYIgl (ORCPT + 99 others); Wed, 25 Mar 2020 04:36:41 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:41892 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726105AbgCYIgl (ORCPT ); Wed, 25 Mar 2020 04:36:41 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) (envelope-from ) id 1jH1Wg-007ht6-Ca; Wed, 25 Mar 2020 09:36:38 +0100 Message-ID: <9d314aa41f9bb094e72791187cadd945dbdfd557.camel@sipsolutions.net> Subject: Re: wmediumd MAC implementation/simulation From: Johannes Berg To: Benjamin Beichler , Bob Copeland Cc: linux-wireless@vger.kernel.org, Masashi Honma Date: Wed, 25 Mar 2020 09:36:36 +0100 In-Reply-To: <12ddd641-1d54-7626-d177-cc2d12c2998e@uni-rostock.de> References: <30484acdee4cd19078673f4f4229dfae49b17804.camel@sipsolutions.net> <20200324145344.GA17278@bobcopeland.com> <3bd9fa47c45cd983334ccae06b75501f161ed45c.camel@sipsolutions.net> <12ddd641-1d54-7626-d177-cc2d12c2998e@uni-rostock.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > > Well, it depends how deep we go, I guess? I mean, we could go all the > > way down to the PHY layer, but then we're _really_ in ns3 territory and > > it's probably not worth it... OTOH, to fully integrate the firmware, we > > probably do need this eventually. But I'd rather not reinvent ns3 here, > > obviously :) > I think it's not the phy but the lower MAC layer, which at least need to > be adapted to the hwsim interface. Although it has no extreme > computational effort, its not that easy to implement. Depending on your > envisioned setup this might already be done in your firmware. Yeah, I think so. > Thy phy > layer will bring much higher timing precision, when the right models are > applied, but will greatly impact the simulation speed. Right. No good for this, I think. And anyway then we're looking at ns-3 I guess. Though I couldn't figure out yesterday how we could possibly integrate all this simulation setup into ns-3. > > int ack_time_usec = pkt_duration(14, index_to_rate(0, frame->freq)) + > > sifs; > > > > but this is incorrect ... so arguably we need that *anyway*? > > Actually you are right. Currently, we apply this by a priori knowledge. > Maybe a silly Idea, but could we interleave the cfg80211/nl80211 > protocol on the virtio channel to get the configuration information? It'd really have to be the *mac80211* protocol, which is based only on function calls etc. so we have to build a messaging layer around it ... which basically is mac80211-hwsim, right? > > I guess I'd start with actually subjecting the ACK to "channel > > conditions", but I'd actually want to be able to hook into the TX/RX in > > some way from the external MAC too ... I just don't think we need to > > treat hwsim as an external MAC because that just complicates the whole > > thing? > > > > Well, honestly, I have no idea :) > > Mhh I don't really get what you mean by that. Why can't you hook into > RX/TX with a simulated ACK ? I guess I could, but then I have to worry about all kinds of MAC capabilities? I mean, essentially I'd end up building a MAC for hwsim, in some integrated fashion, which seems like it probably should've been done in ns-3 already or such? > > > > Or perhaps then that's too much complexity and I should just teach ns3 > > > > the hwsim virtio interface? > > > Up to you :) > > It should be definitely possible. But I'm asking my self how good that > interacts with your firmware simulation. Well, ns-3 *is* layered, no? Arguably then I should be able to remove the MAC layer and put in my own, hooking into the PHY layer signals? But I quickly got lost in the documentation there, and it's not really what I need right now anyway ... johannes