Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3415246rdb; Sun, 10 Dec 2023 05:05:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IFEFCDbsm7CswzOnqFRUNc9GUekTcpDAkXsqWX/qaWNsags4+UQC1a6T33Coshn7noUb47Q X-Received: by 2002:a05:6870:4c8d:b0:1fa:efdc:b497 with SMTP id pi13-20020a0568704c8d00b001faefdcb497mr4290326oab.46.1702213531860; Sun, 10 Dec 2023 05:05:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702213531; cv=none; d=google.com; s=arc-20160816; b=VAR/WAyK03CR/8HPz2TwjkDgO1LaB1LRTIqBxrBDEYn/VW9xUXlaGgkA9Ce6cN5Wev TriYJGfAvV4wlx9JohaEvh1wl0yjoAEizGNMFd36JryjgxJ78zmHdt9UKRa0+sTEqaaq BtgNESMRlp2Ms1Q9cTq9e8IFALXV91fUu7kQ7rFvS/sEukoLvTlcjoWsJwnKVg9xNtBH fntY8Loif6hh++K/3yULP4RVqJKacJ0uqH9nLWAR/JnLK1MeeEX6rHSgCEA8nSXnLcWY ncWqaSXwteeNoGGG3jE6OKajT+TAjFLY8//pQ+2dkLc2cGtk9FY567JESP10/X6RXo+3 BCEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:organization:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=EN+NqBtxKskP7P3Kj2a1zKAZowJx+yCP8JZaXMwtKME=; fh=4oxVHxO5BdV3tkvABCk16Ji14meDL9gyICQIj0dRSAQ=; b=O0FWvKDRixtvs3faMXkKiQmxQiWVxz0VKHPBIYuC+A0Tl+UAhtzQYQrZHPrFw6iFwl xz0cBdBuoYuA57y5Rm5rWKBbr8p1lLjLQCQvyP3CXB0xbQsP5EU8v18yO8rD1WbRBVMf 2ic7H5Z7ZkyMxC5SbxugdIwg19PXG69caJWQHuAjWMRQahL1Y1GOcu4J89LohPuw3YLK OMKAEWcl477rngrl6Q1BaE3T1I8vBvxFZQArRT/SGi1jZeh1xDk7VG4ychRBknVhJRUj Gic/ux1zmbyXgdHxTJNuXzHBwlZSf2xfAFkaKzDFDgDdrvnTeWqTlN0uPaBB5oTNm7CQ RSKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@intel.com header.s=Intel header.b=TAaJNyTd; spf=pass (google.com: domain of linux-wireless+bounces-601-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-601-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id fy5-20020a05622a5a0500b004254d7601cbsi6787610qtb.170.2023.12.10.05.05.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 05:05:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-601-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=fail header.i=@intel.com header.s=Intel header.b=TAaJNyTd; spf=pass (google.com: domain of linux-wireless+bounces-601-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-601-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7E3C31C2042D for ; Sun, 10 Dec 2023 13:05:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 26E7511710; Sun, 10 Dec 2023 13:05:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.b="TAaJNyTd" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FEC210C for ; Sun, 10 Dec 2023 05:05:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702213524; x=1733749524; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tZ7+wE/izBaRQGj8oFwyPgjypteWkGNiW6d7aDysPgY=; b=TAaJNyTddqXbG1XQFU18tyrNt1Wsmf7o8XtJVYp9sYfiT2FZ+uslDM87 g9o1oH5MceRDCEiJwt5WuI2AYVvxBCNxbcge5Ul1Ye+nXj5aV+v8rl1Ue LrG+Leifik9PSevrBLo4Hulqwbvqtxs4VjBOcp9UXpCcqf/t1hSemW1hn uwkSnMeSYVEH3+NDc84POMaCOatgLYPKQ17wB9z2jKA1XEQ5GfyWpQ6HP fW9ITOAc7BHuJG4rv03HnPejhnbWNK5q40N74h1hS9AP8BkjirUmeZYrb f8SWVHQhUsphom/dcuAXT8v/aRYDg9vlOIWv9fr8scJz1lw34nEqlmnY8 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10919"; a="480745745" X-IronPort-AV: E=Sophos;i="6.04,265,1695711600"; d="scan'208";a="480745745" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Dec 2023 05:05:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10919"; a="748925618" X-IronPort-AV: E=Sophos;i="6.04,265,1695711600"; d="scan'208";a="748925618" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Dec 2023 05:05:21 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ilan Peer , Greenman@web.codeaurora.org, Gregory , Berg@web.codeaurora.org, Johannes Subject: [PATCH 06/14] wifi: cfg80211: Update the default DSCP-to-UP mapping Date: Mon, 11 Dec 2023 09:05:24 +0200 Message-Id: <20231211085121.8a1c7d1f0034.I50aed38be78ae9aea052938e2cb6b5800010ecd4@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231211070532.2458539-1-miriam.rachel.korenblit@intel.com> References: <20231211070532.2458539-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited Content-Transfer-Encoding: 8bit From: Ilan Peer The default DSCP-to-UP mapping method defined in RFC8325 applied to packets marked per recommendations in RFC4594 and destined to 802.11 WLAN clients will yield a number of inconsistent QoS mappings. To handle this, modify the mapping of specific DSCP values for which the default mapping will create inconsistencies, based on the recommendations in section 4 in RFC8325. Signed-off-by: Ilan Peer Reviewed-by: Greenman, Gregory Reviewed-by: Berg, Johannes Signed-off-by: Miri Korenblit --- net/wireless/util.c | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/net/wireless/util.c b/net/wireless/util.c index 626b858b4b35..dd93e1950921 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -980,7 +980,53 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb, } } + /* The default mapping as defined in RFC8325 */ ret = dscp >> 5; + + /* Handle specific DSCP values for which the default mapping doesn't + * adhere to the intended usage of the DSCP value. See section 4 in + * RFC8325. + */ + switch (dscp >> 2) { + case 10: + case 12: + case 14: + /* High throughput data: AF11, AF12, AF13 */ + ret = 0; + break; + case 16: + /* Operations, Administration, and Maintenance and Provisioning: + * CS2 + */ + ret = 0; + break; + case 18: + case 20: + case 22: + /* Low latency data: AF21, AF22, AF23 */ + ret = 3; + break; + case 24: + /* Broadcasting video: CS23 */ + ret = 4; + break; + case 40: + /* Signaling: CS5 */ + ret = 5; + break; + case 44: + /* Voice Admit */ + ret = 6; + break; + case 46: + /* Telephony traffic: EF */ + ret = 6; + break; + case 48: + /* Network Control Traffic: CS6 */ + ret = 7; + break; + } out: return array_index_nospec(ret, IEEE80211_NUM_TIDS); } -- 2.34.1