Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2481211rdd; Fri, 12 Jan 2024 10:38:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEH5scKVVBaj6P/7LW8UcsghygFGOsscuYzw+edfHgoQT4r1nPdK77TrlTFYpeWMkd0vIhi X-Received: by 2002:a05:620a:1a1d:b0:783:2399:f472 with SMTP id bk29-20020a05620a1a1d00b007832399f472mr2269312qkb.0.1705084733259; Fri, 12 Jan 2024 10:38:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705084733; cv=none; d=google.com; s=arc-20160816; b=FYR/ieGMaZC3X+uRJUSD/sLoEeqEJNG+wkX1rOn6RMg4AX4aka74NEY/F8n0zMwgQI 5Mi+xTBitnlyStLFYy1a3e3mjYtcctvcFPcAAxSpIrXYjoXVbWWjycthuM0y0qG9KSNM fModbqijqmoF6P4SIPfAe6+CJVTrebvcExWQJb/FTfW9FCkj0nOQBGYym3mbUFnuALNo SNl7hyfFurh9Wg5Vvl0lnhxdVmxVn38I5yk2i8LG+Eat9nzT4LzIrGjg0id1Mu8AjrX5 Wj1/hBWgAHMLz19sbicv7nTqKYOxFQdDfHUBCi8FotOKMmW9Z/5jgJ7YsmDxuWnMbnRG QaxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=fTNdMrIh2e+f0AHVj8Xvr+K1avBkltglLDidS0sWJtM=; fh=EzaoCdr2dKdYGH0qPNymMBPnoZivGtV+3KWa507K+hs=; b=YHb88W962Bn7CwxJuI8VG1t9jFWBOL9qJ9fdVYf9z4D3Z1A7ym8QZghBb+1X9Gqhxm R9kCGOi0c7jfX4IS3UXf2/ca7v4CLbBMj0d1p+I/0LiZaXV/TEHSGPvfd0Ml0EHW2SJS G++QflLJ6C6CH7kChxvcbr3d+M+2qeTSEHGhsZa9a8fG1exxCuKTF4a0O5SbbCc50Uwv HAStspQYKwademFxZqIVHxXTIb1Aye4fbzcwjn4cRqQbCy8dVvzUD5Q//95QLCxCun5d bTnGmETGpATm37STewo5tYTJG3CxOuTkWmLvHhT2n06wLwYVHQxwFOCRuo6+xisP4c5j hBoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mojatatu-com.20230601.gappssmtp.com header.s=20230601 header.b=N8zDztlp; spf=pass (google.com: domain of linux-kernel+bounces-24980-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24980-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id de33-20020a05620a372100b0078321fc9bd9si3639023qkb.367.2024.01.12.10.38.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 10:38:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24980-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@mojatatu-com.20230601.gappssmtp.com header.s=20230601 header.b=N8zDztlp; spf=pass (google.com: domain of linux-kernel+bounces-24980-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24980-linux.lists.archive=gmail.com@vger.kernel.org" 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 08AB61C22739 for ; Fri, 12 Jan 2024 18:38:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0CE5B154B9; Fri, 12 Jan 2024 18:38:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mojatatu-com.20230601.gappssmtp.com header.i=@mojatatu-com.20230601.gappssmtp.com header.b="N8zDztlp" Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (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 B471215AC7 for ; Fri, 12 Jan 2024 18:38:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mojatatu.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=mojatatu.com Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-6da202aa138so5001697b3a.2 for ; Fri, 12 Jan 2024 10:38:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mojatatu-com.20230601.gappssmtp.com; s=20230601; t=1705084723; x=1705689523; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=fTNdMrIh2e+f0AHVj8Xvr+K1avBkltglLDidS0sWJtM=; b=N8zDztlpEhNXxR79jBxcsZLJlNSbSVMB/J6ySIWk0ymotmPMynliP7CjI5KeL4Lct2 7nKqLIGqayF7En6qdoiZcc8gZP0dnBGz2ziBN4nu4ColFG6q8tW9KHv/VOwuspAjmsDy bwk+fVMtu6MyE7UMrqycqeTlh6fmrgZOYL4qMflKIykq+Qc6uBgRHi/jVk8jiriCH3YL IxYOA7PYmAFUMX8AlonGeZ5sEr10D1yZvBUYyvKw5GbV9sVXwDlxyWAVNTRPACjKOCsm eSp/0ridwsjBc5hoTCGWQ36iAxnmB6smFsPSQV5g6ZdG5Iu+TVW4RLekZDWDMNru3ATH eBOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705084723; x=1705689523; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fTNdMrIh2e+f0AHVj8Xvr+K1avBkltglLDidS0sWJtM=; b=Nj6l3f1A5pp6BZjK8mLtnY/RtjFOzT6993SmBYI1TLqjWFWrYoG+GrTLrqYGShaMvA eFwX99/XPMfY2hO8tvplcjhjTUTD3sAVCMgmk8j7Ukg+9Vp6NEvXBfZhkm7LEZ1K83QI SGl/pdA2AthNDKuIzEPif0io+Tv1Ilyz5RUhdSua0JzD4JrRngNZL1K90g/DW3ZiL5tR m0UmdtFojbrKEoDbpq/NO73AFGtmEQD/mRBykWiI/VOPCqIpg1GO6dkd4YHPMXOmBpDw g0bQItAO3PpRp44p7l2tePl30jxh8oOsabU7hLzwUGvfrQyQRMNcUeFsYBAQZTuYapT6 y++g== X-Gm-Message-State: AOJu0Yxz33FhQiPs0Eofi6tWPgGNVxL62SJ+dYHu0aLQyCeDaWnYh5hR 5RnpNSHr0iR5xPtkPRX2Qnuh5eHjV0dL X-Received: by 2002:a05:6a00:1495:b0:6db:337f:2595 with SMTP id v21-20020a056a00149500b006db337f2595mr1711226pfu.0.1705084723008; Fri, 12 Jan 2024 10:38:43 -0800 (PST) Received: from [192.168.50.25] ([201.17.86.134]) by smtp.gmail.com with ESMTPSA id t127-20020a628185000000b006d9e76be7cesm3587322pfd.73.2024.01.12.10.38.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Jan 2024 10:38:42 -0800 (PST) Message-ID: Date: Fri, 12 Jan 2024 15:38:34 -0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/4] net/sched: Add helper macros with module names To: =?UTF-8?Q?Michal_Koutn=C3=BD?= , 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_H=C3=B8iland-J=C3=B8rgensen?= , Vinicius Costa Gomes , Stephen Hemminger , Petr Pavlu , Michal Kubecek , Martin Wilck References: <20240112180646.13232-1-mkoutny@suse.com> <20240112180646.13232-2-mkoutny@suse.com> Content-Language: en-US From: Pedro Tammela In-Reply-To: <20240112180646.13232-2-mkoutny@suse.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 12/01/2024 15:06, Michal Koutný wrote: > 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)) I believe something like (untested): #define TC_CLS_ALIAS_PREFIX "tc-cls-" #define MODULE_ALIAS_TC_CLS(kind) MODULE_ALIAS(TC_CLS_ALIAS_PREFIX __stringify(kind)) And then reuse the macro: request_module(TC_CLS_ALIAS_PREFIX "%s", cls_name); Would look better. In any case, net-next is currently closed. You will need to repost once it reopens. It seems you are also missing a rebase. We recently removed act_ipt :). > > 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); >