Re: nfnetlink_queue -- why linear lookup ?

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


On 8/14/21 11:12 PM, Florian Westphal wrote:
alexandre.ferrieux@xxxxxxxxxx <alexandre.ferrieux@xxxxxxxxxx> wrote:
> Because when this was implemented "highly asynchronous" was not on the
> radar.  All users of this (that I know of) do in-order verdicts.

So, O(N) instead of O(1) just because "I currently can't imagine N>5" ?

Seems so. THis code was written 21 years ago.

Would a patch to that effect be rejected ?

Probably not, depends on the implementation.

Sad: while the (necessarily) async nature of the kernel/user interface naturally suggests this change, one specific part of the existing API complicates things: batch verdicts !

Indeed, the very notion of an "id range" for batch verdicts, forbids the simple approach of reused small integers as array indices.

So, the only way forward would be a separate hashtable on ids. Much less elegant + risk of slight overhead for housekeeping. I stand disappointed :)

PS: what is the intended dominant use case for batch verdicts ?


Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux