RE: [PATCH net-next,v2,1/1] hyperv: Add support for virtual Receive Side Scaling (vRSS)
> -Original Message- > From: Ben Hutchings [mailto:b...@decadent.org.uk] > Sent: Monday, March 17, 2014 4:28 PM > To: Haiyang Zhang > Cc: da...@davemloft.net; net...@vger.kernel.org; KY Srinivasan; > o...@aepfle.de; jasow...@redhat.com; linux-kernel@vger.kernel.org; > driverdev-de...@linuxdriverproject.org > Subject: Re: [PATCH net-next,v2,1/1] hyperv: Add support for virtual Receive > Side Scaling (vRSS) > > On Sat, 2014-03-15 at 10:18 -0700, Haiyang Zhang wrote: > [...] > > #define RING_SIZE_MIN 64 > > -static int ring_size = 128; > > +int ring_size = 128; > > module_param(ring_size, int, S_IRUGO); MODULE_PARM_DESC(ring_size, > > "Ring buffer size (# of pages)"); > > You have to add some driver-specific prefix to the variable name if it is > going to > be extern. (And use module_param_named to avoid changing the parameter > name too.) > > [...] > > +u8 hash_key[HASH_KEYLEN] = { > > + 0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2, > > + 0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0, > > + 0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4, > > + 0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c, > > + 0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa }; > [...] > > Same for this one. > I will do. Thanks, - Haiyang
RE: [PATCH net-next,v2,1/1] hyperv: Add support for virtual Receive Side Scaling (vRSS)
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Monday, March 17, 2014 4:20 PM > To: Haiyang Zhang > Cc: net...@vger.kernel.org; KY Srinivasan; o...@aepfle.de; > jasow...@redhat.com; linux-kernel@vger.kernel.org; driverdev- > de...@linuxdriverproject.org > Subject: Re: [PATCH net-next,v2,1/1] hyperv: Add support for virtual Receive > Side Scaling (vRSS) > > From: Haiyang Zhang > Date: Sat, 15 Mar 2014 10:18:07 -0700 > > > - if (netif_queue_stopped(ndev) && !net_device->start_remove > && > > - (hv_ringbuf_avail_percent(>channel- > >outbound) > > - > RING_AVAIL_PERCENT_HIWATER || > > - num_outstanding_sends < 1)) > > - netif_wake_queue(ndev); > > + if (netif_tx_queue_stopped(netdev_get_tx_queue(ndev, q_idx)) > > + && !net_device->start_remove && > > + (hv_ringbuf_avail_percent(>outbound) > > + > RING_AVAIL_PERCENT_HIWATER || queue_sends < > 1)) > > + netif_tx_wake_queue(netdev_get_tx_queue( > > + ndev, q_idx)); > > This is not indented properly, make it: > > if (A && B && > (C > > D || E < 1)) > > Never put operators at the beginning of a conditional line, always at the end. I will do. Thanks, - Haiyang -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH net-next,v2,1/1] hyperv: Add support for virtual Receive Side Scaling (vRSS)
On Sat, 2014-03-15 at 10:18 -0700, Haiyang Zhang wrote: [...] > #define RING_SIZE_MIN 64 > -static int ring_size = 128; > +int ring_size = 128; > module_param(ring_size, int, S_IRUGO); > MODULE_PARM_DESC(ring_size, "Ring buffer size (# of pages)"); You have to add some driver-specific prefix to the variable name if it is going to be extern. (And use module_param_named to avoid changing the parameter name too.) [...] > +u8 hash_key[HASH_KEYLEN] = { > + 0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2, > + 0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0, > + 0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4, > + 0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c, > + 0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa > +}; [...] Same for this one. Ben. -- Ben Hutchings I'm always amazed by the number of people who take up solipsism because they heard someone else explain it. - E*Borg on alt.fan.pratchett signature.asc Description: This is a digitally signed message part
Re: [PATCH net-next,v2,1/1] hyperv: Add support for virtual Receive Side Scaling (vRSS)
From: Haiyang Zhang Date: Sat, 15 Mar 2014 10:18:07 -0700 > - if (netif_queue_stopped(ndev) && !net_device->start_remove && > - (hv_ringbuf_avail_percent(>channel->outbound) > - > RING_AVAIL_PERCENT_HIWATER || > - num_outstanding_sends < 1)) > - netif_wake_queue(ndev); > + if (netif_tx_queue_stopped(netdev_get_tx_queue(ndev, q_idx)) > + && !net_device->start_remove && > + (hv_ringbuf_avail_percent(>outbound) > + > RING_AVAIL_PERCENT_HIWATER || queue_sends < 1)) > + netif_tx_wake_queue(netdev_get_tx_queue( > + ndev, q_idx)); This is not indented properly, make it: if (A && B && (C > D || E < 1)) Never put operators at the beginning of a conditional line, always at the end. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH net-next,v2,1/1] hyperv: Add support for virtual Receive Side Scaling (vRSS)
From: Haiyang Zhang haiya...@microsoft.com Date: Sat, 15 Mar 2014 10:18:07 -0700 - if (netif_queue_stopped(ndev) !net_device-start_remove - (hv_ringbuf_avail_percent(device-channel-outbound) - RING_AVAIL_PERCENT_HIWATER || - num_outstanding_sends 1)) - netif_wake_queue(ndev); + if (netif_tx_queue_stopped(netdev_get_tx_queue(ndev, q_idx)) + !net_device-start_remove + (hv_ringbuf_avail_percent(channel-outbound) + RING_AVAIL_PERCENT_HIWATER || queue_sends 1)) + netif_tx_wake_queue(netdev_get_tx_queue( + ndev, q_idx)); This is not indented properly, make it: if (A B (C D || E 1)) Never put operators at the beginning of a conditional line, always at the end. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH net-next,v2,1/1] hyperv: Add support for virtual Receive Side Scaling (vRSS)
On Sat, 2014-03-15 at 10:18 -0700, Haiyang Zhang wrote: [...] #define RING_SIZE_MIN 64 -static int ring_size = 128; +int ring_size = 128; module_param(ring_size, int, S_IRUGO); MODULE_PARM_DESC(ring_size, Ring buffer size (# of pages)); You have to add some driver-specific prefix to the variable name if it is going to be extern. (And use module_param_named to avoid changing the parameter name too.) [...] +u8 hash_key[HASH_KEYLEN] = { + 0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2, + 0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0, + 0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4, + 0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c, + 0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa +}; [...] Same for this one. Ben. -- Ben Hutchings I'm always amazed by the number of people who take up solipsism because they heard someone else explain it. - E*Borg on alt.fan.pratchett signature.asc Description: This is a digitally signed message part
RE: [PATCH net-next,v2,1/1] hyperv: Add support for virtual Receive Side Scaling (vRSS)
-Original Message- From: David Miller [mailto:da...@davemloft.net] Sent: Monday, March 17, 2014 4:20 PM To: Haiyang Zhang Cc: net...@vger.kernel.org; KY Srinivasan; o...@aepfle.de; jasow...@redhat.com; linux-kernel@vger.kernel.org; driverdev- de...@linuxdriverproject.org Subject: Re: [PATCH net-next,v2,1/1] hyperv: Add support for virtual Receive Side Scaling (vRSS) From: Haiyang Zhang haiya...@microsoft.com Date: Sat, 15 Mar 2014 10:18:07 -0700 - if (netif_queue_stopped(ndev) !net_device-start_remove - (hv_ringbuf_avail_percent(device-channel- outbound) -RING_AVAIL_PERCENT_HIWATER || - num_outstanding_sends 1)) - netif_wake_queue(ndev); + if (netif_tx_queue_stopped(netdev_get_tx_queue(ndev, q_idx)) +!net_device-start_remove + (hv_ringbuf_avail_percent(channel-outbound) +RING_AVAIL_PERCENT_HIWATER || queue_sends 1)) + netif_tx_wake_queue(netdev_get_tx_queue( + ndev, q_idx)); This is not indented properly, make it: if (A B (C D || E 1)) Never put operators at the beginning of a conditional line, always at the end. I will do. Thanks, - Haiyang -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH net-next,v2,1/1] hyperv: Add support for virtual Receive Side Scaling (vRSS)
-Original Message- From: Ben Hutchings [mailto:b...@decadent.org.uk] Sent: Monday, March 17, 2014 4:28 PM To: Haiyang Zhang Cc: da...@davemloft.net; net...@vger.kernel.org; KY Srinivasan; o...@aepfle.de; jasow...@redhat.com; linux-kernel@vger.kernel.org; driverdev-de...@linuxdriverproject.org Subject: Re: [PATCH net-next,v2,1/1] hyperv: Add support for virtual Receive Side Scaling (vRSS) On Sat, 2014-03-15 at 10:18 -0700, Haiyang Zhang wrote: [...] #define RING_SIZE_MIN 64 -static int ring_size = 128; +int ring_size = 128; module_param(ring_size, int, S_IRUGO); MODULE_PARM_DESC(ring_size, Ring buffer size (# of pages)); You have to add some driver-specific prefix to the variable name if it is going to be extern. (And use module_param_named to avoid changing the parameter name too.) [...] +u8 hash_key[HASH_KEYLEN] = { + 0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2, + 0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0, + 0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4, + 0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c, + 0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa }; [...] Same for this one. I will do. Thanks, - Haiyang