| To: | tgraf@xxxxxxx (Thomas Graf) |
|---|---|
| Subject: | Re: [PATCH] allow setting mtu and txqlen via RTM_SETLINK and provide txqlen via RTM_GETLINK |
| From: | Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> |
| Date: | Tue, 24 Aug 2004 20:16:55 +1000 |
| Cc: | herbert@xxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxx, kuznet@xxxxxxxxxxxxx, hadi@xxxxxxxxxx, netdev@xxxxxxxxxxx |
| In-reply-to: | <20040824094952.GF21073@postel.suug.ch> |
| Organization: | Core |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.26-1-686-smp (i686)) |
Thomas Graf <tgraf@xxxxxxx> wrote: > * Herbert Xu <E1BzR1C-0000c4-00@xxxxxxxxxxxxxxxxxxxxxxxx> 2004-08-24 12:26 >> Thomas Graf <tgraf@xxxxxxx> wrote: >> > >> > + RTA_PUT(skb, IFLA_TXQLEN, sizeof(unsigned long), >> > &dev->tx_queue_len); >> >> Please use a fixed width type like u32. > > I used the same type as it is stored in struct net_device to avoid data > loss on certain architectures. Due to the fact that the size of the > attribute is provided to the userspace receiver, no guessing is involved. > Using u32 would mean to do an unnecessary cast. Please think about the meaning of the value. Is anyone going to have a queue bigger than 2^32? And if the answer is yes, then please use u64. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt |
| Previous by Date: | Re: [PATCH] allow setting mtu and txqlen via RTM_SETLINK and provide txqlen via RTM_GETLINK, Thomas Graf |
|---|---|
| Next by Date: | [PATCH] 2.6.9-rc1 compile fix: ip_conntrack_proto_udp.c / ip_conntrack_proto_icmp.c, Russell King |
| Previous by Thread: | Re: [PATCH] allow setting mtu and txqlen via RTM_SETLINK and provide txqlen via RTM_GETLINK, Thomas Graf |
| Next by Thread: | Re: [PATCH] allow setting mtu and txqlen via RTM_SETLINK and provide txqlen via RTM_GETLINK, Thomas Graf |
| Indexes: | [Date] [Thread] [Top] [All Lists] |