Re: [DCCP]: Add priority queuing policy

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

 



Gerrit Renker pisze:
Please revise this patch with regard to CodingStyle -- checkpatch gave
38 errors here.

| --- a/net/dccp/dccp.h
| +++ b/net/dccp/dccp.h
| @@ -330,10 +330,16 @@ struct dccp_skb_cb {
|  	__u16 dccpd_opt_len;
|  	__u64 dccpd_seq;
|  	__u64 dccpd_ack_seq;
| +	char  dccpd_policy[16];
|  };
| | #define DCCP_SKB_CB(__skb) ((struct dccp_skb_cb *)&((__skb)->cb[0])) | | +struct dccp_policy_prio {
| +	s8	priority;
| +};
| +#define SKB_PRIO(__skbcb) ((struct dccp_policy_prio *)&((__skbcb)->dccpd_policy[0]))
| +
There is an indirection here which is problematic:
 * it pre-allocates 16 bytes but currently only uses one byte
 * with regard to the recent patch for IPv4/v6 parameters, the skb_cb
   space gets smaller, and there is no test such as BUILD_BUG_ON
 * the element should be the struct (can remain anonymous), so there would not be
   the double-indirection in the SKB_PRIO typecast (which is also too long)

But the whole point is that this struct can be different for different queuing policies. Statically allocating fixed amount of bytes is one way (as for me it doesn't have to be 16), using a void pointer is second one and I don't see the third way if qpolicy should be able to define its own additional per-packet information. But I'm open to ideas...
--
Regards,
Tomasz Grobelny
--
To unsubscribe from this list: send the line "unsubscribe dccp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [IETF DCCP]     [Linux Networking]     [Git]     [Security]     [Linux Assembly]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux