From owner-freebsd-wireless@freebsd.org Wed Mar 16 04:51:50 2016 Return-Path: Delivered-To: freebsd-wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29205AD214D for ; Wed, 16 Mar 2016 04:51:50 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB09718AF for ; Wed, 16 Mar 2016 04:51:49 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-ig0-x22c.google.com with SMTP id mh10so32862852igb.0 for ; Tue, 15 Mar 2016 21:51:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to; bh=7Sn8asT/ZehXFGdvLIalRxlDrbWGMBUK/cScJkLBQos=; b=uprKsHMV0CKQI/ZSQmZp4vF6iqWXUxXkaaNPQMkxy+9eR7bxtHi5c5LzhXROc6Udwu OlS/WZGB6altZ5fyTx/H7x1I8vELv/xNx/ytBXu9CQ1jg/Ko6Hj2dESPZajPLaSShrWE RwrEU4kmPXiJSSEK2wyVjnQkbQuMxySx9IPjsc+1AbqrJVK7KHpOAw+hyDLCPQsBbYTA 07Z4nFMlHRLVZ8PEeAlBkw/8/QCmPestyIOwtPxIl6LyP1KE/fwYkH5j7S8bqUfE1m/3 btlPTugQpWhfDOQ3h6zHKmikVBp3gUoRgFi6Uwd8psJLg8VhjRIURM/GPx+yT4WhLokw f9kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:date:message-id:subject:from :to; bh=7Sn8asT/ZehXFGdvLIalRxlDrbWGMBUK/cScJkLBQos=; b=TpGbVfFWkJWu1ZlJpYbrgE9BKC9G7U86lyEb3hh9nnNv61kjhNXz0UwnYuo5D8DraT n1iGkHGfpQ38kRq0INWVTc63cOlY6dW3dGVoyB1TQDhhprVXoXgN9iqdDzwIyHNuFMvH pFcUmghVDMnoPT8Ze1hAdgEiQGPFp8Td5L37qKbLO4qI05jd44hQBExXpuyL0lshJYsm b2DPCS9dhrXLnjtdw56UXqwek2RoOgouMy4pTCj4DeHO4NtIZA5zIraeEfQoeCqYRYom xzrO47n075MN9VCb/w2GCkGJqHNUxN52XGKYveTHhDy9PWDMO5fW6X8pjKnyGG7rwlxZ wQiA== X-Gm-Message-State: AD7BkJKGjHPjJG8ColD2YAbHB3l1nPcTOmZwPYanyVF9zyVvZUJYUdCS/ghlMwFU2yvPYnd+oZfV76zLsG6esw== MIME-Version: 1.0 X-Received: by 10.50.43.134 with SMTP id w6mr2391075igl.22.1458103908913; Tue, 15 Mar 2016 21:51:48 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.14.19 with HTTP; Tue, 15 Mar 2016 21:51:48 -0700 (PDT) Date: Tue, 15 Mar 2016 21:51:48 -0700 X-Google-Sender-Auth: rddpy_Ry06FzYjGRBjyjZHDzBDM Message-ID: Subject: churning ratectl api From: Adrian Chadd To: "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.21 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: Wed, 16 Mar 2016 04:51:50 -0000 hiya, I'd like to start churning the ratectl api in preparation for teaching it about more interesting things (eg ath_rate_sample, ath_rate_onoe) and hopefully getting it ready for some 11ac things in the future. There are some immediate things I'd like to change: * not everything implements both tx_update and tx_complete. I'd like to fix that. * I don't like the void * / int args that are left to the implementation to define. It means things aren't /really/ plug/play'able, which is kinda silly. * ieee8021_ratectl_rate() is currently used inconsistently, the pktlen isn't passed in, other things that are missing (eg is it multicast? etc); it returns rix rather than rate and it means that the users are typically calling the function and then checking ni_txrates. That's a bit race-prone for me and means I can't do things like choose a different rate based on packet size. * there's like, zero locking in use anywhere here. There's also a bunch of things that we could prepare for - eg, the multi-rate retry schedules that some hardware supports (ath, iwn/iwm to some extent, etc), proper 11n support and A-MSDU / A-MPDU support. So I'd like some input on this before I rush off and redesign it all. I'll braindump some of this into a wiki page soon so interested parties can help out churn things. thanks! -a