Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2464141rdd; Fri, 12 Jan 2024 10:07:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IFzey5M6Jd9AIEmSaGiOxt6uw9ykUHvRsolhtOYJBgzrsyIIXJrlhajpdcpkz3CVCsh7tNq X-Received: by 2002:a62:4d85:0:b0:6da:32e7:170 with SMTP id a127-20020a624d85000000b006da32e70170mr1141483pfb.57.1705082843667; Fri, 12 Jan 2024 10:07:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705082843; cv=none; d=google.com; s=arc-20160816; b=idjlyv387ndXsgfICiXufNv+tPlm6WfCnTzjTqmGSMXb5ChzbtRFaguO+uE2aSNsur TJ4KFftkub0Ce1oVe/yQu+gONHpEtGo2A8LyYbWD196cmn49EY9Y7XbFnhgsSV+NN7Kc 4AgX3Y1YxGWkOTb5yhCSdyIu/QdbSLQ8BEBLC/V+snSUD4J49o0uZAMty1WyO0t24ULN 0PWHwNgulcKbaKbcYJeEIyR2k92/WjMydm8lq/8hQxOCsVVLFe6ywHQhCeAqS9dF1zaS LofmhFFV8O82WrZbA2PP/Kk3S35Pv11kXVdRPI2A/GuVuwNUhb7t0YSWrUuKLx9AK1uL r9og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-signature; bh=UiZKmcBfhUwyucttFraFdSTZKVbJV3vqXBGniwGuBto=; fh=a4IwiDc1rQTJUNsQPpfsZCkn5Tpe7qIl8+Qi0hPvcJM=; b=fSisaZK96avQgyavg2UVyDDZsPXvoYWyKImqswP2SF4x7+k7ZmjNbEB6KkRtgHyODs yuwrtOOe7f/x8XUgECe/1Kp7fk9wU7XXgIAl2r8fbNss/WrvHkD+6QaugLIq0DYjwlVm sj2yB+L1ta0cqzJxED9ZmhBUUI4fv+mP8DpTWuX29spXI4JThBtJvvqNj0uTYIa5WvQy z1U2QDgV+5RLRviF+AmoXmaJAGEoceT4kT8/SrpZZW2+9ZODHQovDCjECc4NDXq8XzCs dtm5aSqAAmYbHdgqZLQboqbSyQjt8TpZzqcacobRTwNBmM2I0KoUrjVM0KC7SFTb8Cvw SJuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=eWV0YOpr; dkim=pass header.i=@suse.com header.s=susede1 header.b=eWV0YOpr; spf=pass (google.com: domain of linux-kernel+bounces-24951-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24951-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bq16-20020a056a000e1000b006d9c0155be3si3672603pfb.9.2024.01.12.10.07.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 10:07:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24951-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=eWV0YOpr; dkim=pass header.i=@suse.com header.s=susede1 header.b=eWV0YOpr; spf=pass (google.com: domain of linux-kernel+bounces-24951-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24951-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 56AFD2866B6 for ; Fri, 12 Jan 2024 18:07:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 03CC21AADD; Fri, 12 Jan 2024 18:06:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="eWV0YOpr"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="eWV0YOpr" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E2A117C95; Fri, 12 Jan 2024 18:06:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 2E8221FCE8; Fri, 12 Jan 2024 18:06:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1705082809; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UiZKmcBfhUwyucttFraFdSTZKVbJV3vqXBGniwGuBto=; b=eWV0YOprL4dVYITe6nOmvsEBLbkaT8i/sLXBg+JCvhPhlTOGvgR/6B2Gn1dGgnhvxwQqkq ho4IhrGg9QhWk2mqVDRo5nYqdEUjZO+kTtbOOn8wBeD7u64Fh36//19PGtPzQ1HOii01ii 4fbsNN0WuSUvs7XJuWRVMc7F6HdT83o= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1705082809; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UiZKmcBfhUwyucttFraFdSTZKVbJV3vqXBGniwGuBto=; b=eWV0YOprL4dVYITe6nOmvsEBLbkaT8i/sLXBg+JCvhPhlTOGvgR/6B2Gn1dGgnhvxwQqkq ho4IhrGg9QhWk2mqVDRo5nYqdEUjZO+kTtbOOn8wBeD7u64Fh36//19PGtPzQ1HOii01ii 4fbsNN0WuSUvs7XJuWRVMc7F6HdT83o= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 9BB80139AB; Fri, 12 Jan 2024 18:06:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id mE0EJbh/oWXLQwAAD6G6ig (envelope-from ); Fri, 12 Jan 2024 18:06:48 +0000 From: =?UTF-8?q?Michal=20Koutn=C3=BD?= To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, cake@lists.bufferbloat.net Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jamal Hadi Salim , Cong Wang , Jiri Pirko , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , Vinicius Costa Gomes , Stephen Hemminger , Petr Pavlu , Michal Kubecek , Martin Wilck Subject: [PATCH v3 1/4] net/sched: Add helper macros with module names Date: Fri, 12 Jan 2024 19:06:43 +0100 Message-ID: <20240112180646.13232-2-mkoutny@suse.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240112180646.13232-1-mkoutny@suse.com> References: <20240112180646.13232-1-mkoutny@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Authentication-Results: smtp-out2.suse.de; none X-Spamd-Result: default: False [2.40 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_RATELIMIT(0.00)[to_ip_from(RL63s8thh5w8zyxj4waeg9pq8e)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; RCPT_COUNT_TWELVE(0.00)[28]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[davemloft.net,google.com,kernel.org,redhat.com,mojatatu.com,gmail.com,resnulli.us,iogearbox.net,linux.dev,toke.dk,intel.com,networkplumber.org,suse.cz,suse.com]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-Spam-Level: ** X-Spam-Score: 2.40 X-Spam-Flag: NO The macros are preparation for adding module aliases en mass in a separate commit. Although it would be tempting to create aliases like cls-foo for name cls_foo, this could not be used because modprobe utilities treat '-' and '_' interchangeably. In the end, the naming follows pattern of proto modules in linux/net.h. Signed-off-by: Michal Koutný --- include/net/act_api.h | 1 + include/net/pkt_cls.h | 1 + include/net/pkt_sched.h | 1 + 3 files changed, 3 insertions(+) diff --git a/include/net/act_api.h b/include/net/act_api.h index 4ae0580b63ca..ade63a9157f2 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h @@ -200,6 +200,7 @@ int tcf_idr_release(struct tc_action *a, bool bind); int tcf_register_action(struct tc_action_ops *a, struct pernet_operations *ops); int tcf_unregister_action(struct tc_action_ops *a, struct pernet_operations *ops); +#define MODULE_ALIAS_NET_ACT(kind) MODULE_ALIAS("net-act-" __stringify(kind)) int tcf_action_destroy(struct tc_action *actions[], int bind); int tcf_action_exec(struct sk_buff *skb, struct tc_action **actions, int nr_actions, struct tcf_result *res); diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index a76c9171db0e..906ccfea81f2 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h @@ -24,6 +24,7 @@ struct tcf_walker { int register_tcf_proto_ops(struct tcf_proto_ops *ops); void unregister_tcf_proto_ops(struct tcf_proto_ops *ops); +#define MODULE_ALIAS_NET_CLS(kind) MODULE_ALIAS("net-cls-" __stringify(kind)) struct tcf_block_ext_info { enum flow_block_binder_type binder_type; diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 9fa1d0794dfa..88ab6d0ab08b 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -100,6 +100,7 @@ struct Qdisc *fifo_create_dflt(struct Qdisc *sch, struct Qdisc_ops *ops, int register_qdisc(struct Qdisc_ops *qops); void unregister_qdisc(struct Qdisc_ops *qops); +#define MODULE_ALIAS_NET_SCH(id) MODULE_ALIAS("net-sch-" __stringify(id)) void qdisc_get_default(char *id, size_t len); int qdisc_set_default(const char *id); -- 2.43.0