Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp5286133ybb; Tue, 24 Mar 2020 14:29:57 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtNnhWC1Gk+Y11CPzce+2tOM/0w5hz6CKmffEXOle4afJ6kaZ2V5BVTbRRM2J08yYcCig6n X-Received: by 2002:a9d:6945:: with SMTP id p5mr104892oto.268.1585085397682; Tue, 24 Mar 2020 14:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585085397; cv=none; d=google.com; s=arc-20160816; b=mi1P2RhNlX+LII1Gt76wRg0kObKO5L8KTfFEddZxmQCO8AYZNA57VNQlSboZwLMV2/ zB32sS75n2BCtWjMA40k8UNzhUWchxzorKCLz7G8VxE87vhciABRiuR78bCEiDjmzAvj 08u5FtCUPrLVpSIn2sYHS3ehnZpQwtQ/rM2qC2+agflLyJFvR7ttQi5s/g3VsJmGXcC9 PqOCcm6pbOARuDjKw98uvXG8TcaX+fvd1FT6Z85Vha7CmGOKjYsGDISdr5JMm2W5jwRa 4eQxEnpfCzK896KiMuUdn32jAnTXNkBRObpb9/xumruSzqPX8B1Nae2M7id55bbZVM5X 9MXQ== 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=80Q5QtpD2EkXqTifIVblXU0NvQYPzpmqHuvqBR0MuV4=; b=ScHn9cRZlppFE7Ide7J64gGTYjOvziyU+v4tMGLWlo647iwnTZN9tfaFEt2uXEecnm eyO5chyORh1d/2xhnXQE6i0y6QYihlLMWuN69Rs02VdDIMg+CYS9v5PPUHrHwRUMnF5K KlTfQjw3tGC2eWQ90CHDGQkXJTm8dym50NhfcKZH+9Twd0Pa7335IHn89zf1JLMJaVSR MYUzV3cjT22hGIAHILGsN06h20iFPXnr/kUmtvV+30VcA+yuMYjjd9b2ElL7vAPiZ+A0 0XDd5NFaftEL1PI2eNeZE/g0F28bDOrTaMoy5JIcFZxA5/6yhQIhV4L2XqiZHFXOw2nK ImAg== 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 d1si2513845otq.225.2020.03.24.14.29.03; Tue, 24 Mar 2020 14:29:57 -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 S1727664AbgCXV0V (ORCPT + 99 others); Tue, 24 Mar 2020 17:26:21 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:56734 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727023AbgCXV0V (ORCPT ); Tue, 24 Mar 2020 17:26:21 -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 1jGr3y-006JZq-LR; Tue, 24 Mar 2020 22:26:18 +0100 Message-ID: <3bd9fa47c45cd983334ccae06b75501f161ed45c.camel@sipsolutions.net> Subject: Re: wmediumd MAC implementation/simulation From: Johannes Berg To: Bob Copeland Cc: linux-wireless@vger.kernel.org, Masashi Honma Date: Tue, 24 Mar 2020 22:26:16 +0100 In-Reply-To: <20200324145344.GA17278@bobcopeland.com> (sfid-20200324_155347_092664_62837DB4) References: <30484acdee4cd19078673f4f4229dfae49b17804.camel@sipsolutions.net> <20200324145344.GA17278@bobcopeland.com> (sfid-20200324_155347_092664_62837DB4) 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 On Tue, 2020-03-24 at 10:53 -0400, Bob Copeland wrote: > On Mon, Mar 23, 2020 at 02:56:46PM +0100, Johannes Berg wrote: > > I wonder if this should be split, implementing a "real" MAC for hwsim, > > and then sending also the ACKs "properly", perhaps implementing RTS/CTS > > behaviour in the MAC, etc.? > > The reason I did it this way was to go more for rough approximation rather > than fidelity to get whatever simplifications that allows. For example, > loop really only considers a single frame at a time (and all of its rateset) > rather than all the possible stations that could be sending at a given time > step. That is good enough for comparing rate controllers, and doing some > mesh testing with a few one-off hacks bolted on top, but nowhere near > complete. Right, sure. I don't really object to this - but I realized it really doesn't fit my model when I tried to integrate our firmware into it :) And then I was left wondering if I really should even try ... > That said, splitting them apart and having more realistic mac layer sounds > reasonable -- how do you anticipate it looking? 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've been trying to come up with some kind of hybrid model, where perhaps we simulate the bare minimum for hwsim, and provide some kind of "mostly the transport" bits for integrating other things. Though I may still decide that even that is overkill, and right now I don't even care about the timing accuracy at all, I just want something to work first. What I anticipate this looking like is kinda hard to say, and we'd need significantly more API between hwsim and its MAC too, because even to simulate the ACK accurately we'd need to know the basic/mandatory rate bitmap - right now the code just does int ack_time_usec = pkt_duration(14, index_to_rate(0, frame->freq)) + sifs; but this is incorrect ... so arguably we need that *anyway*? 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 :) > > Or perhaps then that's too much complexity and I should just teach ns3 > > the hwsim virtio interface? > > Up to you :) :) johannes