]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: listener/thread: remove now unused bind_conf's bind_tgroup/bind_thread
authorWilly Tarreau <w@1wt.eu>
Thu, 2 Feb 2023 16:01:10 +0000 (17:01 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 3 Feb 2023 17:00:21 +0000 (18:00 +0100)
Not needed anymore since last commit, let's get rid of it.

include/haproxy/listener-t.h
include/haproxy/thread.h
src/cfgparse.c
src/thread.c

index 90a67b2db5d4db079526123e8af91f669a2dd7a6..899c8492474d969e302b8354449ffd1c05b59a7b 100644 (file)
@@ -205,8 +205,6 @@ struct bind_conf {
        int line;                  /* line where the section appears */
        __decl_thread(HA_RWLOCK_T sni_lock); /* lock the SNI trees during add/del operations */
        struct thread_set thread_set; /* entire set of the allowed threads (0=no restriction) */
-       unsigned long bind_thread; /* bitmask of threads allowed on this bind_conf */
-       uint bind_tgroup;          /* thread group ID: 0=global IDs, non-zero=local IDs */
        struct rx_settings settings; /* all the settings needed for the listening socket */
 };
 
index 068e6e86297a7563b9fc01d043fc4d9859a6f681..6590706ee3732598a4e6a7da06365bd4d32a4368 100644 (file)
@@ -44,7 +44,7 @@ void ha_tkill(unsigned int thr, int sig);
 void ha_tkillall(int sig);
 void ha_thread_relax(void);
 int thread_map_to_groups();
-int thread_resolve_group_mask(struct thread_set *ts, int defgrp, uint *ogid, ulong *omask, char **err);
+int thread_resolve_group_mask(struct thread_set *ts, int defgrp, char **err);
 int parse_thread_set(const char *arg, struct thread_set *ts, char **err);
 extern int thread_cpus_enabled_at_boot;
 
index 659f2396a52970a24e24a73ea2aa427662367cd8..75d0b5664f3b5d9de204e0b2b3d3ededca0b964b 100644 (file)
@@ -2954,8 +2954,7 @@ init_proxies_list_stage1:
 
                        /* detect and address thread affinity inconsistencies */
                        err = NULL;
-                       if (thread_resolve_group_mask(&bind_conf->thread_set, 1,
-                                                     &bind_conf->bind_tgroup, &bind_conf->bind_thread, &err) < 0) {
+                       if (thread_resolve_group_mask(&bind_conf->thread_set, (curproxy == global.cli_fe) ? 1 : 0, &err) < 0) {
                                ha_alert("Proxy '%s': %s in 'bind %s' at [%s:%d].\n",
                                           curproxy->id, err, bind_conf->arg, bind_conf->file, bind_conf->line);
                                free(err);
@@ -4436,8 +4435,7 @@ init_proxies_list_stage2:
                                        }
 
                                        err = NULL;
-                                       if (thread_resolve_group_mask(&bind_conf->thread_set, (curproxy == global.cli_fe) ? 1 : 0,
-                                                                     &bind_conf->bind_tgroup, &bind_conf->bind_thread, &err) < 0) {
+                                       if (thread_resolve_group_mask(&bind_conf->thread_set, 1, &err) < 0) {
                                                ha_alert("Peers section '%s': %s in 'bind %s' at [%s:%d].\n",
                                                         curpeers->peers_fe->id, err, bind_conf->arg, bind_conf->file, bind_conf->line);
                                                free(err);
index 75ce24afd992d2ab2974c46c861dca3dba45d8ab..94d150d9642939344b84a1182b342d06de7d7683 100644 (file)
@@ -1228,13 +1228,11 @@ int thread_map_to_groups()
  * was completed and the thread group numbers configured. The thread_set is
  * replaced by the resolved group-based one. It is possible to force a single
  * default group for unspecified sets instead of enabling all groups by passing
- * this group's non-zero value to defgrp. The output ogid and omask are set,
- * respectively, to the first non-empty group and its mask. They're used only
- * for the transition to the new model.
+ * this group's non-zero value to defgrp.
  *
  * Returns <0 on failure, >=0 on success.
  */
-int thread_resolve_group_mask(struct thread_set *ts, int defgrp, uint *ogid, ulong *omask, char **err)
+int thread_resolve_group_mask(struct thread_set *ts, int defgrp, char **err)
 {
        struct thread_set new_ts = { 0 };
        ulong mask, imask;
@@ -1319,10 +1317,6 @@ int thread_resolve_group_mask(struct thread_set *ts, int defgrp, uint *ogid, ulo
        }
 
        *ts = new_ts;
-
-       /* FIXME: for now we still also return the old format */
-       *ogid  = thread_set_first_group(ts);
-       *omask = thread_set_first_tmask(ts);
        return 0;
 }