From: JessePeng <jesse@deansoft.com.tw>
To: netfilter-devel@lists.netfilter.org
Subject: according to 2.4 destroy_conntrack's optimization
Date: Thu, 13 Nov 2003 19:46:24 +0800 [thread overview]
Message-ID: <3FB36F10.2030004@deansoft.com.tw> (raw)
[-- Attachment #1: Type: text/plain, Size: 1379 bytes --]
shoud we add one line to the remove_expectations() as the following:
1.the one line as:
ip_conntrack_put(ct);
2.the new remove_expectations() as:
static void remove_expectations(struct ip_conntrack *ct)
{
struct list_head *exp_entry, *next;
struct ip_conntrack_expect *exp;
DEBUGP("remove_expectations(%p)\n", ct);
for (exp_entry = ct->sibling_list.next;
exp_entry != &ct->sibling_list; exp_entry = next) {
next = exp_entry->next;
exp = list_entry(exp_entry, struct ip_conntrack_expect,
expected_list);
/* we skip established expectations, as we want to delete
* the un-established ones only */
if (exp->sibling) {
DEBUGP("remove_expectations: skipping established %p of
%p\n", exp->sibling, ct);
/* Indicate that this expectations parent is dead */
exp->expectant = NULL;
/* here we let the use -1,otherwise some day the child
connection die, he'll fail to put his parent's ct use,
* so I'm afraid that this ct cache will hang forever!!!*/
ip_conntrack_put(ct); ;-)
continue;
}
IP_NF_ASSERT(list_inlist(&ip_conntrack_expect_list, exp));
IP_NF_ASSERT(exp->expectant == ct);
/* delete expectation from global and private lists */
unexpect_related(exp);
}
}
[-- Attachment #2.1: Type: text/html, Size: 2564 bytes --]
reply other threads:[~2003-11-13 11:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3FB36F10.2030004@deansoft.com.tw \
--to=jesse@deansoft.com.tw \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.