Other than modifying ICSK_CA_PRIV_SIZE, any way to add more info to a tcp socket?

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

 



Hi,

When defining my own TCP congestion control,  I encountered this:

BUILD_BUG_ON(sizeof(struct mytcp) > ICSK_CA_PRIV_SIZE);

Every socket using my own congestion control has an instance of the
struct mytcp, which stores per-socket information.  The above bug
means the size of struct mytcp exceeds the limit of kernel's
predefined per-socket struct size.

Provided the struct mytcp cannot be trimmed down any more, and
meanwhile ICSK_CA_PRIV_SIZE can not be increased, is there any way to
add more info to a socket ?

I am thinking about making a certain filed of the struct mytcp be a
pointer, so that when the socket gets created, a hook function is
invoked to kmalloc some memory to store extra information.  And when
the socket is destroyed, that memory is also destroyed by some hook
function.   But this idea seems a little bit messy, and I dunno what
the exact hook functions are.

Any other remedies?


Best,

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux