lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTi=7M=gSgBjcrCVEj+GKZ5cf5t4MPqm6r9NGr=MZ@mail.gmail.com>
Date:	Sun, 2 Jan 2011 21:48:15 +0200
From:	Daniel Baluta <daniel.baluta@...il.com>
To:	stefani@...bold.net
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	davem@...emloft.net, netdev@...r.kernel.org,
	eric.dumazet@...il.com, shemminger@...tta.com
Subject: Re: [PATCH] new UDPCP Communication Protocol

Hello,

I have some style comments, please read below.

> +struct udpcp_statistics {
> +       unsigned int txMsgs;            /* Num of transmitted messages */
> +       unsigned int rxMsgs;            /* Num of received messages */
> +       unsigned int txNodes;           /* Num of receiver nodes */
> +       unsigned int rxNodes;           /* Num of transmitter nodes */
> +       unsigned int txTimeout;         /* Num of unsuccessful transmissions */
> +       unsigned int rxTimeout;         /* Num of partial message receptions */
> +       unsigned int txRetries;         /* Num of resends */
> +       unsigned int rxDiscardedFrags;  /* Num of discarded fragments */
> +       unsigned int crcErrors;         /* Num of crc errors detected */

Is there any strong reason to have this camel case naming?
I would prefer tx_msgs, rx_msgs etc..

> +struct udpcp_dest {
> +       struct list_head list;
> +       struct sk_buff_head xmit;
> +       unsigned long tx_time;
> +       unsigned long rx_time;
> +       u32 txTimeout;
> +       u32 rxTimeout;

Here you have mixed naming conventions. I guess
tx_timeout will fit in better than txTimeout.

> +       u32 txRetries;
> +       u32 rxDiscardedFrags;
> +       struct sk_buff *xmit_wait;
> +       struct sk_buff *xmit_last;
> +       struct sk_buff *recv_msg;
> +       struct sk_buff *recv_last;
> +       struct udpcphdr lastmsg;
> +       struct ipcm_cookie ipc;
> +       struct flowi fl;
> +       struct rtable *rt;
> +       __be32 addr;
> +       __be16 port;
> +       u16 msgid;
> +       u8 use_flag;
> +       u8 insync;
> +       u8 ackmode;
> +       u8 chkmode;
> +       u8 try;
> +       u8 acks;
> +       struct udp_sock udpsock;
> +       struct sk_buff_head assembly;
> +       u32 assembly_len;
> +       struct udpcp_dest *assembly_dest;
> +       wait_queue_head_t wq;
> +       struct list_head destlist;
> +       struct list_head udpcplist;
> +       struct timer_list timer;
> +       struct udpcp_statistics stat;
> +       u32 pending;
> +       unsigned long tx_timeout;
> +       unsigned long rx_timeout;
> +       void (*udp_data_ready) (struct sock *sk, int bytes);
> +       u8 ackmode;
> +       u8 chkmode;
> +       u8 maxtry;
> +       u8 acks;
> +       u8 timeout;
> +/* overall UDPCP statistics */
> +static atomic_t udpcp_txMsgs;
> +static atomic_t udpcp_rxMsgs;
> +static atomic_t udpcp_txNodes;
> +static atomic_t udpcp_rxNodes;
> +static atomic_t udpcp_txTimeout;
> +static atomic_t udpcp_rxTimeout;
> +static atomic_t udpcp_txRetries;
> +static atomic_t udpcp_rxDiscardedFrags;
> +static atomic_t udpcp_crcErrors;

same here.

> +
> +module_param(debug, int, 0);
> +MODULE_PARM_DESC(debug, "Debug enabled or not");
> +

thanks,
Daniel.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ