[dpdk-dev] [PATCH v4 2/4] kcp: add kernel control path kernel module

2016-03-02 Thread Ferruh Yigit
On 3/1/2016 11:10 PM, Stephen Hemminger wrote: > On Tue, 1 Mar 2016 15:41:58 + > Ferruh Yigit wrote: > >> +struct kcp_ethtool_msg { >> +int cmd_id; >> +int port_id; >> +unsigned int flag; >> +char input_buffer[KCP_ETHTOOL_MSG_LEN]; >> +char output_buffer[KCP_ETHTOOL_MSG_L

[dpdk-dev] [PATCH v4 2/4] kcp: add kernel control path kernel module

2016-03-02 Thread Ferruh Yigit
On 3/1/2016 11:06 PM, Stephen Hemminger wrote: > On Tue, 1 Mar 2016 15:41:58 + > Ferruh Yigit wrote: > >> +#ifdef RTE_KCP_KO_DEBUG >> +#define KCP_DBG(args...) pr_info(args) >> +#else >> +#define KCP_DBG(args...) >> +#en > > Why not use pr_debug() which is compile enabled already and suppor

[dpdk-dev] [PATCH v4 2/4] kcp: add kernel control path kernel module

2016-03-01 Thread Ferruh Yigit
This kernel module is based on KNI module, but this one is stripped version of it and only for control messages, no data transfer functionality provided. This Linux kernel module helps userspace application create virtual interfaces and when a control command issued into that virtual interface, mo

[dpdk-dev] [PATCH v4 2/4] kcp: add kernel control path kernel module

2016-03-01 Thread Stephen Hemminger
On Tue, 1 Mar 2016 15:41:58 + Ferruh Yigit wrote: > +struct kcp_ethtool_msg { > + int cmd_id; > + int port_id; > + unsigned int flag; > + char input_buffer[KCP_ETHTOOL_MSG_LEN]; > + char output_buffer[KCP_ETHTOOL_MSG_LEN]; > + int input_buffer_len; > + int output_

[dpdk-dev] [PATCH v4 2/4] kcp: add kernel control path kernel module

2016-03-01 Thread Stephen Hemminger
On Tue, 1 Mar 2016 15:41:58 + Ferruh Yigit wrote: > + > +static int kcp_net_set_mac(struct net_device *dev, void *p) > +{ > + struct sockaddr *addr = p; > + int err = 0; Unnecessary assignment. > + > + if (!is_valid_ether_addr((unsigned char *)(addr->sa_data))) No cast needed:

[dpdk-dev] [PATCH v4 2/4] kcp: add kernel control path kernel module

2016-03-01 Thread Stephen Hemminger
On Tue, 1 Mar 2016 15:41:58 + Ferruh Yigit wrote: > +#ifdef RTE_KCP_KO_DEBUG > +#define KCP_DBG(args...) pr_info(args) > +#else > +#define KCP_DBG(args...) > +#en Why not use pr_debug() which is compile enabled already and supports dynamic enabling as well.