Skip to content

Commit

Permalink
Using a more friendly name : belong_to_aeds to belong_to_host
Browse files Browse the repository at this point in the history
  • Loading branch information
chenwei committed Dec 9, 2017
1 parent 447a82c commit 5c797d9
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions app/nginx-1.11.10/src/core/ngx_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ ngx_open_listening_sockets(ngx_cycle_t *cycle)
if (ngx_process <= NGX_PROCESS_MASTER) {

/* process master, kernel network stack*/
if (!ls[i].belong_to_aeds) {
if (!ls[i].belong_to_host) {
/* We should continue to process the listening socket,
if it is not supported by fstack.*/
if (fstack_territory(ls[i].sockaddr->sa_family, ls[i].type, 0)) {
Expand All @@ -422,7 +422,7 @@ ngx_open_listening_sockets(ngx_cycle_t *cycle)
}
} else if (NGX_PROCESS_WORKER == ngx_process) {
/* process worker, fstack */
if (ls[i].belong_to_aeds) {
if (ls[i].belong_to_host) {
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion app/nginx-1.11.10/src/core/ngx_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct ngx_listening_s {
#endif

#if (NGX_HAVE_FSTACK)
unsigned belong_to_aeds:1;
unsigned belong_to_host:1;
#endif
};

Expand Down
2 changes: 1 addition & 1 deletion app/nginx-1.11.10/src/event/modules/ngx_ff_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ ngx_ff_add_channel_event(ngx_cycle_t *cycle, ngx_fd_t fd,
rev->channel = 1;
wev->channel = 1;

rev->belong_to_aeds = wev->belong_to_aeds = 1;
rev->belong_to_host = wev->belong_to_host = 1;

ev = (event == NGX_READ_EVENT) ? rev : wev;
ev->handler = handler;
Expand Down
2 changes: 1 addition & 1 deletion app/nginx-1.11.10/src/event/ngx_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ ngx_event_process_init(ngx_cycle_t *cycle)
#if (NGX_HAVE_FSTACK)
/* Note when nginx running on fstack,
make sure that add the right fd to kqueue !! */
c->read->belong_to_aeds = c->write->belong_to_aeds = ls[i].belong_to_aeds;
c->read->belong_to_host = c->write->belong_to_host = ls[i].belong_to_host;
#endif

#if (NGX_HAVE_DEFERRED_ACCEPT)
Expand Down
6 changes: 3 additions & 3 deletions app/nginx-1.11.10/src/event/ngx_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ struct ngx_event_s {
#endif

#if (NGX_HAVE_FSTACK)
unsigned belong_to_aeds:1;
unsigned belong_to_host:1;
#endif
};

Expand Down Expand Up @@ -417,7 +417,7 @@ extern ngx_event_actions_t ngx_event_actions_dy;

static inline ngx_int_t
ngx_add_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags) {
if (1 == ev->belong_to_aeds) {
if (1 == ev->belong_to_host) {
return ngx_event_actions_dy.add(ev, event, flags);
} else {
return ngx_event_actions.add(ev, event, flags);
Expand All @@ -426,7 +426,7 @@ extern ngx_event_actions_t ngx_event_actions_dy;

static inline ngx_int_t
ngx_del_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags) {
if (1 == ev->belong_to_aeds) {
if (1 == ev->belong_to_host) {
return ngx_event_actions_dy.del(ev, event, flags);
} else {
return ngx_event_actions.del(ev, event, flags);
Expand Down
2 changes: 1 addition & 1 deletion app/nginx-1.11.10/src/event/ngx_event_accept.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ ngx_event_accept(ngx_event_t *ev)
wev = c->write;

#if (NGX_HAVE_FSTACK)
rev->belong_to_aeds = wev->belong_to_aeds = ev->belong_to_aeds;
rev->belong_to_host = wev->belong_to_host = ev->belong_to_host;
#endif

wev->ready = 1;
Expand Down
2 changes: 1 addition & 1 deletion app/nginx-1.11.10/src/event/ngx_event_posted.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
\
if (!(ev)->posted) { \
(ev)->posted = 1; \
if (1 == (ev)->belong_to_aeds) { \
if (1 == (ev)->belong_to_host) { \
if (q == &ngx_posted_events) { \
ngx_queue_insert_tail( \
&ngx_posted_events_of_aeds, &(ev)->queue); \
Expand Down
4 changes: 2 additions & 2 deletions app/nginx-1.11.10/src/event/ngx_event_timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ngx_event_del_timer(ngx_event_t *ev)

#if (NGX_HAVE_FSTACK)

if(ev->belong_to_aeds){
if(ev->belong_to_host){
ngx_rbtree_delete(&ngx_aeds_timer_rbtree, &ev->timer);
} else {
ngx_rbtree_delete(&ngx_event_timer_rbtree, &ev->timer);
Expand Down Expand Up @@ -98,7 +98,7 @@ ngx_event_add_timer(ngx_event_t *ev, ngx_msec_t timer)

#if (NGX_HAVE_FSTACK)

if(ev->belong_to_aeds){
if(ev->belong_to_host){
ngx_rbtree_insert(&ngx_aeds_timer_rbtree, &ev->timer);
} else {
ngx_rbtree_insert(&ngx_event_timer_rbtree, &ev->timer);
Expand Down
2 changes: 1 addition & 1 deletion app/nginx-1.11.10/src/http/ngx_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -1776,7 +1776,7 @@ ngx_http_add_listening(ngx_conf_t *cf, ngx_http_conf_addr_t *addr)
#endif

#if (NGX_HAVE_FSTACK)
ls->belong_to_aeds = cscf->kernel_network_stack;
ls->belong_to_host = cscf->kernel_network_stack;
#endif

return ls;
Expand Down
2 changes: 1 addition & 1 deletion app/nginx-1.11.10/src/mail/ngx_mail.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ ngx_mail_optimize_servers(ngx_conf_t *cf, ngx_array_t *ports)
#endif

#if (NGX_HAVE_FSTACK)
ls->belong_to_aeds = cscf->kernel_network_stack;
ls->belong_to_host = cscf->kernel_network_stack;
#endif

mport = ngx_palloc(cf->pool, sizeof(ngx_mail_port_t));
Expand Down
2 changes: 1 addition & 1 deletion app/nginx-1.11.10/src/stream/ngx_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ ngx_stream_optimize_servers(ngx_conf_t *cf, ngx_array_t *ports)
#endif

#if (NGX_HAVE_FSTACK)
ls->belong_to_aeds = cscf->kernel_network_stack;
ls->belong_to_host = cscf->kernel_network_stack;
#endif

stport = ngx_palloc(cf->pool, sizeof(ngx_stream_port_t));
Expand Down

0 comments on commit 5c797d9

Please sign in to comment.