per-socket nfmark settings?

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

 



i'd like to modify apache so that it sets some sort of hint on TCP sockets
associated with particular domains/directories, and have the hint used to
do traffic shaping in the kernel.  IPTOS doesn't provide enough resolution
for my needs.

i've been digging around the 2.4 source, and it seems like the struct
sk_buff nfmark field might be something i could use to do this.  but it
doesn't appear that a userland app can control this field on a per-socket
basis.

i was thinking of doing this:

- add default_nfmark field to struct sock
- add SO_NFMARK and setsockopt() support in net/core/sock.c
- add support to tcp_output.c et al to copy the default_nfmark into
  the skbs (probably use default_nfmark == 0 to indiciate no change)

i recognize this isn't exactly a perfect solution... and i'd welcome some
input.

thanks
-dean

p.s. i'm not on linux-net, so please cc me.




-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux