Re: [NETFILTER]: Move extensions' arguments into compound structure (1/2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jan Engelhardt wrote:
On Sunday 2008-10-05 10:30, Patrick McHardy wrote:
@@ -223,9 +223,18 @@ do_match(struct ip6t_entry_match *m,
        unsigned int protoff,
        bool *hotdrop)
{
+	struct xt_match_param par = {
+		.in        = in,
+		.out       = out,
+		.match     = m->u.kernel.match,
+		.matchinfo = m->data,
+		.fragoff   = offset,
+		.thoff     = protoff,
+		.hotdrop   = hotdrop,
+	};
Some of these members are constant during evaluation, so it would save
some overhead to initialize the structure on a higher level and only
fill in the match specific bits in do_match(). Alternatively you could
use two structures, one for the fixes bits related to the packet, one
for the match specific bits.

Yes I/we can still do that, but I wanted to get the big API change out
at least, hoping that it fits into the upcoming window.

Reducing the overhead before merging will make me a lot more
comfortable accepting this patch without seeing any numbers
since its adding overhead to one of the hottest spots of ruleset
evaluation.

BTW, networking is using the same patch headline scheme as most of
the other subsystems nowadays, so please use "netfilter: " instead
of [NETFILTER]: in future patches. I also usually add the netfilter
internal subsystem, so this one would probably be
"netfilter: x_tables: move extensions' arguments ...".

Yup. When space is tight (and we only have like 74 chars to make it
fit onto a screen, accounting for the git-log indent and one extra
byte), it will have to do without the subsystem.

No, I'm adding it anyways and exceeding the limit is fine for
changelogs if it aids in readability. So please just add it so
I don't have to edit the descriptions every time.

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux