Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp389846rdb; Fri, 17 Nov 2023 01:32:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7Sc9JMJL3YfwwGCr7dz7fagqaLCWXDtd6stjXEKvQ+us5HJkDkn7TuNFyfgTs2kHtNSvL X-Received: by 2002:a17:90b:1a91:b0:283:2805:7c78 with SMTP id ng17-20020a17090b1a9100b0028328057c78mr15693343pjb.14.1700213537658; Fri, 17 Nov 2023 01:32:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700213537; cv=none; d=google.com; s=arc-20160816; b=qPnKnAyRrcXcnYBil2z+9wuttfAh1Uz49gIXPo1I5Pn50A/xBlq5yn9pTqBWSwFi7l +4Uqs7yOfAWpxcuUE0dGnQVKBY1hylhuGUzY6VdVCx+mZVKz/A/zVqsm9QPHoJxHCofL 7QHdmM10VE3/SZX25qP28HmjeHK/RQ1sRW+YwhhqX5XpOiO+vpv9coF9rXD2JhI+LoUr wIvlCx9gJ28HenP/0SdN/7BlDGuJdaq4sPdQcOUIUauz/29RKgieH5h4nYCpqrvNsSo6 GoGp+0vUG3GImLOt/ijhY0VHYlEszWdqpJsqK6UTTCDRwyQ3hw1ZMq7aspaEoxEbGuL3 rlxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=7muo/9rmkRulgQSfI9PF1LMiQ2spmhcA87NBrYKQ1dw=; fh=9HDsYpQssAJMVf0hqZhwGyXxyD34VEw8QReY43p2s3M=; b=ezpTZPzJVZ3LYvErf9aCuRLd5OyehvHxX0xNHQGzsb1HegGavF3/MJUuYCgvv4L+4P neRESyHab8df5zey43HI1gUUEpRn5dQqs4LWcb4HLVTp6OxW2xvnEmEGJQW1OOrEFRSY 1M+GkJYDqG0CFOUGHrVjESZxYguCUU6OjNfMkPqAyMjSogiU4yPGdJVMKnHOk9ROgxfB MajX/XI+/rZAQQUV1IzWixl+szjWL+qOI4LVjhkdUSIusuf1v24TtBRi4qWkTURg4qzc YJyRP6GFRMK/j4uVtZBlkvKYKonR2Vv9iicgL5KV83LILLCazw3TU+a7zgbiWU/6L5RX +1sQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id nb13-20020a17090b35cd00b00282eb8021fasi336502pjb.188.2023.11.17.01.32.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 01:32:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 2AB218072153; Fri, 17 Nov 2023 01:32:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345810AbjKQJcP (ORCPT + 99 others); Fri, 17 Nov 2023 04:32:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235745AbjKQJby (ORCPT ); Fri, 17 Nov 2023 04:31:54 -0500 Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30BB31BF4; Fri, 17 Nov 2023 01:31:22 -0800 (PST) X-UUID: 741c89e8083b44548c3e8f5979b47101-20231117 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.32,REQID:1dbef51b-9855-4ee6-a412-64bef59f35a1,IP:5,U RL:0,TC:0,Content:0,EDM:25,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:15 X-CID-INFO: VERSION:1.1.32,REQID:1dbef51b-9855-4ee6-a412-64bef59f35a1,IP:5,URL :0,TC:0,Content:0,EDM:25,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:15 X-CID-META: VersionHash:5f78ec9,CLOUDID:2ca5c472-1bd3-4f48-b671-ada88705968c,B ulkID:231117172305AN6C5S4D,BulkQuantity:1,Recheck:0,SF:66|38|24|17|19|44|1 02,TC:nil,Content:0,EDM:5,IP:-2,URL:0,File:nil,Bulk:40,QS:nil,BEC:nil,COL: 0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_FSD,TF_CID_SPAM_FSI,TF_CID_SPAM_SNR,TF_CID_SPAM_FAS X-UUID: 741c89e8083b44548c3e8f5979b47101-20231117 X-User: chentao@kylinos.cn Received: from vt.. [(116.128.244.169)] by mailgw (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 842865564; Fri, 17 Nov 2023 17:31:14 +0800 From: Kunwu Chan To: jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: kunwu.chan@hotmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kunwu Chan Subject: [PATCH] net: sched: Fix an endian bug in tcf_proto_create Date: Fri, 17 Nov 2023 17:31:10 +0800 Message-Id: <20231117093110.1842011-1-chentao@kylinos.cn> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 17 Nov 2023 01:32:16 -0800 (PST) net/sched/cls_api.c:390:22: warning: incorrect type in assignment (different base types) net/sched/cls_api.c:390:22: expected restricted __be16 [usertype] protocol net/sched/cls_api.c:390:22: got unsigned int [usertype] protocol Fixes: 33a48927c193 ("sched: push TC filter protocol creation into a separate function") Signed-off-by: Kunwu Chan --- net/sched/cls_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 1976bd163986..f73f39f61f66 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -387,7 +387,7 @@ static struct tcf_proto *tcf_proto_create(const char *kind, u32 protocol, goto errout; } tp->classify = tp->ops->classify; - tp->protocol = protocol; + tp->protocol = cpu_to_be16(protocol); tp->prio = prio; tp->chain = chain; spin_lock_init(&tp->lock); -- 2.34.1