* [PATCH] enic: enic_main: fix sparse warnings
From: Lad Prabhakar @ 2015-02-05 15:34 UTC (permalink / raw)
To: Christian Benvenuti, Sujith Sankar, Govindarajulu Varadarajan,
Neel Patel, netdev
Cc: linux-kernel, Lad, Prabhakar
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
this patch fixes following sparse warnings:
enic_main.c:92:28: warning: symbol 'mod_table' was not declared. Should it be static?
enic_main.c:109:28: warning: symbol 'mod_range' was not declared. Should it be static?
enic_main.c:1306:5: warning: symbol 'enic_busy_poll' was not declared. Should it be static?
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
Found this issue on linux-next (gcc version 4.8.2,
sparse version 0.4.5-rc1)and applies on top linux-next.
drivers/net/ethernet/cisco/enic/enic_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index ee44c82..9cbe038 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -89,7 +89,7 @@ MODULE_DEVICE_TABLE(pci, enic_id_table);
* coalescing timer values
* {rx_rate in Mbps, mapping percentage of the range}
*/
-struct enic_intr_mod_table mod_table[ENIC_MAX_COALESCE_TIMERS + 1] = {
+static struct enic_intr_mod_table mod_table[ENIC_MAX_COALESCE_TIMERS + 1] = {
{4000, 0},
{4400, 10},
{5060, 20},
@@ -106,7 +106,7 @@ struct enic_intr_mod_table mod_table[ENIC_MAX_COALESCE_TIMERS + 1] = {
/* This table helps the driver to pick different ranges for rx coalescing
* timer depending on the link speed.
*/
-struct enic_intr_mod_range mod_range[ENIC_MAX_LINK_SPEEDS] = {
+static struct enic_intr_mod_range mod_range[ENIC_MAX_LINK_SPEEDS] = {
{0, 0}, /* 0 - 4 Gbps */
{0, 3}, /* 4 - 10 Gbps */
{3, 6}, /* 10 - 40 Gbps */
@@ -1303,7 +1303,7 @@ static void enic_set_rx_cpu_rmap(struct enic *enic)
#endif /* CONFIG_RFS_ACCEL */
#ifdef CONFIG_NET_RX_BUSY_POLL
-int enic_busy_poll(struct napi_struct *napi)
+static int enic_busy_poll(struct napi_struct *napi)
{
struct net_device *netdev = napi->dev;
struct enic *enic = netdev_priv(netdev);
--
1.9.1
^ permalink raw reply related
* Re: [RFC PATCH net-next 00/11] net: remove disable_irq() from ->ndo_poll_controller
From: Sabrina Dubroca @ 2015-02-05 15:33 UTC (permalink / raw)
To: Peter Zijlstra, David Miller; +Cc: Thomas Gleixner, netdev
In-Reply-To: <20150205130623.GH5029@twins.programming.kicks-ass.net>
2015-02-05, 14:06:23 +0100, Peter Zijlstra wrote:
> On Thu, Feb 05, 2015 at 01:20:59AM +0100, Sabrina Dubroca wrote:
> > Thomas, ping?
> >
> > thread is over there if you need it:
> > https://marc.info/?l=linux-netdev&m=141833435000554&w=2
>
> It appears to me you have addressed most his issues and since it appears
> to me the existing synchronze_hardirq() seems to be mostly what we need
> I'll propose (and merge) the below and will take flames from tglx when
> he returns :-)
Great, thanks a lot Peter!
I will prepare the drivers patches based on this.
David, do you want one patch for each driver, or do you want me to group the changes?
There are 60+ drivers to patch, and almost all the patches are just:
- disable_irq(irq);
- handler(a, b);
+ if (disable_hardirq(irq))
+ handler(a,b);
> ---
> Subject: genirq: Provide disable_hardirq()
>
> For things like netpoll there is a need to disable an interrupt from
> atomic context. Currently netpoll uses disable_irq() which will
> sleep-wait on threaded handlers and thus forced_irqthreads breaks
> things.
>
> Provide disable_hardirq(), which uses synchronize_hardirq() to only wait
> for active hardirq handlers; also change synchronize_hardirq() to
> return the status of threaded handlers.
>
> This will allow one to try-disable an interrupt from atomic context, or
> in case of request_threaded_irq() to only wait for the hardirq part.
>
> Suggested-by: Sabrina Dubroca <sd@queasysnail.net>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
> include/linux/hardirq.h | 2 +-
> include/linux/interrupt.h | 1 +
> kernel/irq/manage.c | 36 ++++++++++++++++++++++++++++++++++--
> 3 files changed, 36 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
> index cba442ec3c66..f4af03404b97 100644
> --- a/include/linux/hardirq.h
> +++ b/include/linux/hardirq.h
> @@ -9,7 +9,7 @@
>
>
> extern void synchronize_irq(unsigned int irq);
> -extern void synchronize_hardirq(unsigned int irq);
> +extern bool synchronize_hardirq(unsigned int irq);
>
> #if defined(CONFIG_TINY_RCU)
>
> diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
> index d9b05b5bf8c7..3bb01b9a379c 100644
> --- a/include/linux/interrupt.h
> +++ b/include/linux/interrupt.h
> @@ -184,6 +184,7 @@ extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id);
> #endif
>
> extern void disable_irq_nosync(unsigned int irq);
> +extern bool disable_hardirq(unsigned int irq);
> extern void disable_irq(unsigned int irq);
> extern void disable_percpu_irq(unsigned int irq);
> extern void enable_irq(unsigned int irq);
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index f038e586a4b9..1309cccd714f 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -68,14 +68,20 @@ static void __synchronize_hardirq(struct irq_desc *desc)
> * Do not use this for shutdown scenarios where you must be sure
> * that all parts (hardirq and threaded handler) have completed.
> *
> + * Returns: false if a theaded handler is active.
> + *
> * This function may be called - with care - from IRQ context.
> */
> -void synchronize_hardirq(unsigned int irq)
> +bool synchronize_hardirq(unsigned int irq)
> {
> struct irq_desc *desc = irq_to_desc(irq);
>
> - if (desc)
> + if (desc) {
> __synchronize_hardirq(desc);
> + return !atomic_read(&desc->threads_active);
> + }
> +
> + return true;
> }
> EXPORT_SYMBOL(synchronize_hardirq);
>
> @@ -439,6 +445,32 @@ void disable_irq(unsigned int irq)
> }
> EXPORT_SYMBOL(disable_irq);
>
> +/**
> + * disable_hardirq - disables an irq and waits for hardirq completion
> + * @irq: Interrupt to disable
> + *
> + * Disable the selected interrupt line. Enables and Disables are
> + * nested.
> + * This function waits for any pending hard IRQ handlers for this
> + * interrupt to complete before returning. If you use this function while
> + * holding a resource the hard IRQ handler may need you will deadlock.
> + *
> + * When used to optimistically disable an interrupt from atomic context
> + * the return value must be checked.
> + *
> + * Returns: false if a theaded handler is active.
> + *
> + * This function may be called - with care - from IRQ context.
> + */
> +bool disable_hardirq(unsigned int irq)
> +{
> + if (!__disable_irq_nosync(irq))
> + return synchronize_hardirq(irq);
> +
> + return false;
> +}
> +EXPORT_SYMBOL(disable_hardirq);
> +
> void __enable_irq(struct irq_desc *desc, unsigned int irq)
> {
> switch (desc->depth) {
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Sabrina
^ permalink raw reply
* [PATCH] enic: enic_ethtool: fix sparse warning
From: Lad Prabhakar @ 2015-02-05 15:29 UTC (permalink / raw)
To: Christian Benvenuti, Sujith Sankar, Govindarajulu Varadarajan,
Neel Patel, netdev
Cc: linux-kernel, Lad, Prabhakar
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
this patch fixes following sparse warning:
enic_ethtool.c:95:6: warning: symbol 'enic_intr_coal_set_rx' was not declared. Should it be static?
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
Found this issue on linux-next (gcc version 4.8.2,
sparse version 0.4.5-rc1)and applies on top linux-next.
drivers/net/ethernet/cisco/enic/enic_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cisco/enic/enic_ethtool.c b/drivers/net/ethernet/cisco/enic/enic_ethtool.c
index 0c396c1..28d9ca6 100644
--- a/drivers/net/ethernet/cisco/enic/enic_ethtool.c
+++ b/drivers/net/ethernet/cisco/enic/enic_ethtool.c
@@ -92,7 +92,7 @@ static const unsigned int enic_n_tx_stats = ARRAY_SIZE(enic_tx_stats);
static const unsigned int enic_n_rx_stats = ARRAY_SIZE(enic_rx_stats);
static const unsigned int enic_n_gen_stats = ARRAY_SIZE(enic_gen_stats);
-void enic_intr_coal_set_rx(struct enic *enic, u32 timer)
+static void enic_intr_coal_set_rx(struct enic *enic, u32 timer)
{
int i;
int intr;
--
1.9.1
^ permalink raw reply related
* [PATCH] be2net: fix sparse warning
From: Lad Prabhakar @ 2015-02-05 15:24 UTC (permalink / raw)
To: Sathya Perla, Subbu Seetharaman, Ajit Khaparde, netdev
Cc: linux-kernel, Lad, Prabhakar
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
this patch fixes following sparse warning:
be_cmds.c:2750:5: warning: symbol 'be_cmd_set_qos' was not declared. Should it be static?
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
Found this issue on linux-next (gcc version 4.8.2,
sparse version 0.4.5-rc1)and applies on top linux-next.
drivers/net/ethernet/emulex/benet/be_cmds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index 4bd425e..b5aa772 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -2747,7 +2747,7 @@ err:
return status;
}
-int be_cmd_set_qos(struct be_adapter *adapter, u32 bps, u32 domain)
+static int be_cmd_set_qos(struct be_adapter *adapter, u32 bps, u32 domain)
{
struct be_mcc_wrb *wrb;
struct be_cmd_req_set_qos *req;
--
1.9.1
^ permalink raw reply related
* [PATCH] chelsio: cxgb4: fix sparse warning
From: Lad Prabhakar @ 2015-02-05 15:20 UTC (permalink / raw)
To: Hariprasad S, netdev; +Cc: linux-kernel, Lad, Prabhakar
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
this patch fixes following sparse warning:
cxgb4_dcb.c:25:6: warning: symbol 'dcb_ver_array' was not declared. Should it be static?
Alongside making it const.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
Found this issue on linux-next (gcc version 4.8.2,
sparse version 0.4.5-rc1)and applies on top linux-next.
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
index b65a5bd..6074680 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
@@ -22,7 +22,7 @@
/* DCBx version control
*/
-char *dcb_ver_array[] = {
+static const char * const dcb_ver_array[] = {
"Unknown",
"DCBx-CIN",
"DCBx-CEE 1.01",
--
1.9.1
^ permalink raw reply related
* Re: [PATCH net-next 2/3] IB/mlx4: Always use the correct port for mirrored multicast attachments
From: Moni Shoua @ 2015-02-05 15:18 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Or Gerlitz, David S. Miller, netdev, Roland Dreier, Amir Vadai,
Tal Alon
In-Reply-To: <54D3787C.3030603@cogentembedded.com>
>> goto err_create_flow;
>> i++;
>> if (is_bonded) {
>> + /* Application always sees one port so the mirror
>> rule
>> + * must be on port #2
>> + */
>
>
> Unrelated change?
>
I think that it is somewhat related since it explains why the fix,
though seems to be relevant also here is actually not
>> flow_attr->port = 2;
>> err = __mlx4_ib_create_flow(qp, flow_attr,
>> domain, type[j],
>> @@ -1279,14 +1282,15 @@ static int mlx4_ib_mcg_attach(struct ib_qp *ibqp,
>> union ib_gid *gid, u16 lid)
>>
>> err = mlx4_multicast_attach(mdev->dev, &mqp->mqp, gid->raw,
>> mqp->port,
>> !!(mqp->flags &
>> -
>> MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK),
>> + MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK),
>
>
> This change is both unrelated and unneeded.
I agree.
>
>> prot, ®_id.id);
>> if (err)
>> goto err_malloc;
>>
>> reg_id.mirror = 0;
>> if (mlx4_is_bonded(dev)) {
>> - err = mlx4_multicast_attach(mdev->dev, &mqp->mqp,
>> gid->raw, 2,
>> + err = mlx4_multicast_attach(mdev->dev, &mqp->mqp,
>> gid->raw,
>> + (mqp->port == 1) ? 2 : 1,
>
>
> I doubt that these parens are needed.
You are right if all you care about is the machine code. For
readability I like the parens.
>
> WBR, Sergei
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH] i40e: fix sparse warning
From: Lad Prabhakar @ 2015-02-05 15:13 UTC (permalink / raw)
To: Jeff Kirsher, Jesse Brandeburg, Bruce Allan, Carolyn Wyborny,
Don Skidmore, Greg Rose, Matthew Vick, John Ronciak,
Mitch Williams, Linux NICS
Cc: e1000-devel, netdev, linux-kernel, Lad, Prabhakar
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
this patch fixes following sparse warning:
i40e_lan_hmc.c:911:24: warning: constant 0xFFFFFFFFFFFFFFFF is so big it is unsigned long
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
Found this issue on linux-next (gcc version 4.8.2,
sparse version 0.4.5-rc1)and applies on top linux-next.
drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c b/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c
index 4627588..f221ace 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c
@@ -908,7 +908,7 @@ static void i40e_write_qword(u8 *hmc_bits,
if (ce_info->width < 64)
mask = ((u64)1 << ce_info->width) - 1;
else
- mask = 0xFFFFFFFFFFFFFFFF;
+ mask = 0xFFFFFFFFFFFFFFFFULL;
/* don't swizzle the bits until after the mask because the mask bits
* will be in a different bit position on big endian machines
--
1.9.1
^ permalink raw reply related
* Re: [ovs-dev] [RFC: add openvswitch actions using BPF 2/2] openvswitch: implements the BPF_PROG action in datapath
From: Thomas Graf @ 2015-02-05 15:07 UTC (permalink / raw)
To: Andy Zhou; +Cc: dev, netdev
In-Reply-To: <1423090122-19807-3-git-send-email-azhou@nicira.com>
On 02/04/15 at 02:48pm, Andy Zhou wrote:
> BPF_PROG action allows an action to be implemented in eBPF language and
> downloaded by the userspace at runtime.
>
> Signed-off-by: Andy Zhou <azhou@nicira.com>
Thanks a lot for putting this together Andy and Joe and everybody else
who was involved. This is much further than what I expected as a first
step.
One slight open from my side is the avoidance of versioning help of
helpers. We want to avoid v2, v3, ... helpers if the need should arise
to extend an existing helper.
I think it should be doable with BPF to have the verifier accept if
a helper is called with less args than expected, to initialize those
to 0. This would allow for helpers to support additional arguments.
I think this needs to be documented and expectations should be clear.
Other than that I'm very very happy with where this is going.
It seems very doable to also allow for a BPF prog to be registered
upon flow table miss.
^ permalink raw reply
* [PATCH] hyperv: fix sparse warnings
From: Lad Prabhakar @ 2015-02-05 15:06 UTC (permalink / raw)
To: K. Y. Srinivasan, Haiyang Zhang, devel
Cc: netdev, Lad, Prabhakar, linux-kernel
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
this patch fixes following sparse warnings:
netvsc.c:688:5: warning: symbol 'netvsc_copy_to_send_buf' was not declared. Should it be static?
rndis_filter.c:627:5: warning: symbol 'rndis_filter_set_offload_params' was not declared. Should it be static?
rndis_filter.c:702:5: warning: symbol 'rndis_filter_set_rss_param' was not declared. Should it be static?
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
Found this issue on linux-next (gcc version 4.9.2,
sparse version 0.4.5-rc1) and applies on top linux-next.
drivers/net/hyperv/netvsc.c | 6 +++---
drivers/net/hyperv/rndis_filter.c | 5 +++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 58bb410..208eb05 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -685,9 +685,9 @@ static u32 netvsc_get_next_send_section(struct netvsc_device *net_device)
return ret_val;
}
-u32 netvsc_copy_to_send_buf(struct netvsc_device *net_device,
- unsigned int section_index,
- struct hv_netvsc_packet *packet)
+static u32 netvsc_copy_to_send_buf(struct netvsc_device *net_device,
+ unsigned int section_index,
+ struct hv_netvsc_packet *packet)
{
char *start = net_device->send_buf;
char *dest = (start + (section_index * net_device->send_section_size));
diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c
index 7bd8387..7816d98 100644
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -624,7 +624,8 @@ cleanup:
return ret;
}
-int rndis_filter_set_offload_params(struct hv_device *hdev,
+static int
+rndis_filter_set_offload_params(struct hv_device *hdev,
struct ndis_offload_params *req_offloads)
{
struct netvsc_device *nvdev = hv_get_drvdata(hdev);
@@ -699,7 +700,7 @@ u8 netvsc_hash_key[HASH_KEYLEN] = {
0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa
};
-int rndis_filter_set_rss_param(struct rndis_device *rdev, int num_queue)
+static int rndis_filter_set_rss_param(struct rndis_device *rdev, int num_queue)
{
struct net_device *ndev = rdev->net_dev->ndev;
struct rndis_request *request;
--
1.9.1
^ permalink raw reply related
* Re: [PATCH 1/2] ipv6: Resolve sparce error with fragment id selection
From: Eric Dumazet @ 2015-02-05 14:57 UTC (permalink / raw)
To: Vladislav Yasevich; +Cc: netdev, Vladislav Yasevich
In-Reply-To: <1423147297-4757-2-git-send-email-vyasevic@redhat.com>
On Thu, 2015-02-05 at 09:41 -0500, Vladislav Yasevich wrote:
> Resolve the following sparce error:
> net/ipv6/output_core.c:57:38: sparse: incorrect type in assignment
> (different base types)
> net/ipv6/output_core.c:57:38: expected restricted __be32
> [usertype] ip6_frag_id
> net/ipv6/output_core.c:57:38: got unsigned int [unsigned]
> [assigned] [usertype] id
>
patch title is misleading.
Lot of 'sparse bugs' are about not using proper types, but here
a bug on little endian arches is fixed.
sparse helped to detect the bug.
> Fixes: 0508c07f5e0c9 (ipv6: Select fragment id during UFO segmentation
> if not set.)
Please do not wrap this line
> Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
> ---
> net/ipv6/output_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ipv6/output_core.c b/net/ipv6/output_core.c
> index 54520a0..a86cf60 100644
> --- a/net/ipv6/output_core.c
> +++ b/net/ipv6/output_core.c
> @@ -54,7 +54,7 @@ void ipv6_proxy_select_ident(struct sk_buff *skb)
>
> id = __ipv6_select_ident(ip6_proxy_idents_hashrnd,
> &addrs[1], &addrs[0]);
> - skb_shinfo(skb)->ip6_frag_id = id;
> + skb_shinfo(skb)->ip6_frag_id = htonl(id);
> }
> EXPORT_SYMBOL_GPL(ipv6_proxy_select_ident);
>
^ permalink raw reply
* Re: Throughput regression with `tcp: refine TSO autosizing`
From: Eric Dumazet @ 2015-02-05 14:48 UTC (permalink / raw)
To: Michal Kazior
Cc: Neal Cardwell, linux-wireless, Network Development,
eyalpe-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb
In-Reply-To: <CA+BoTQmcShK0U_cXvEOLY_8y7LH8x3taTgjcyMzv0MLVn4UtCA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Thu, 2015-02-05 at 14:44 +0100, Michal Kazior wrote:
> I do get your point. But 1.5ms is really tough on Wi-Fi.
>
> Just look at this:
>
> ; ping 192.168.1.2 -c 3
> PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.
> 64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=1.83 ms
> 64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 time=2.02 ms
> 64 bytes from 192.168.1.2: icmp_seq=3 ttl=64 time=1.98 ms
Thats a different point.
I dont care about rtt but TX completions. (usually much much lower than
rtt)
I can have a 4 usec delay from the moment a NIC submits a packet to the
wire and I get TX completion IRQ, free the packet.
Yet the pong reply can come 100 ms later.
It does not mean the 4 usec delay is a problem.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [ovs-dev] [RFC: add openvswitch actions using BPF 1/2] BPF: add a new BPF program type BPF_PROG_TYPE_OPENVSWITCH
From: Thomas Graf @ 2015-02-05 14:48 UTC (permalink / raw)
To: Andy Zhou; +Cc: dev, netdev
In-Reply-To: <1423090122-19807-2-git-send-email-azhou@nicira.com>
On 02/04/15 at 02:48pm, Andy Zhou wrote:
> struct bpf_verifier_ops {
> /* return eBPF function prototype for verification */
> - const struct bpf_func_proto *(*get_func_proto)(enum bpf_func_id func_id);
> + const struct bpf_func_proto *(*get_func_proto)(int func_id);
This change should maybe go in a separate commit.
> +static const struct bpf_func_proto *ovs_func_proto(int func_id)
> +{
> + switch (func_id) {
> + case OVS_BPF_FUNC_output:
> + return &bpf_helper_output_proto;
> + default:
> + return NULL;
> + }
> +}
You'd still want to use the map helpers so it seems like we should
change the bpf verified to verify against both a global and type
specific list unless we want to add all the map helpers to
ovs_func_proto as well.
> +static bool test_is_valid_access(int off, int size, enum bpf_access_type type)
> +{
> + const struct bpf_context_access *access;
> +
> + if (off < 0 || off >= ARRAY_SIZE(bpf_ctx_access))
> + return false;
> +
> + access = &bpf_ctx_access[off];
> + if (access->size == size && (access->type & type))
> + return true;
> +
> + return false;
> +}
OK. I see why you kept ctxt simple at first ;-)
^ permalink raw reply
* [PATCH 2/2] ipv6: Make __ipv6_select_ident static
From: Vladislav Yasevich @ 2015-02-05 14:41 UTC (permalink / raw)
To: netdev; +Cc: Vladislav Yasevich
In-Reply-To: <1423147297-4757-1-git-send-email-vyasevic@redhat.com>
Make __ipv6_select_ident() static as it isn't used outside
the file.
Fixes: 0508c07f5e0c9 (ipv6: Select fragment id during UFO segmentation if not set.)
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
---
include/net/ipv6.h | 2 --
net/ipv6/output_core.c | 3 ++-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 6e416f6..fde3b59 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -671,8 +671,6 @@ static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_add
return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr));
}
-u32 __ipv6_select_ident(u32 hashrnd, struct in6_addr *dst,
- struct in6_addr *src);
void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt);
void ipv6_proxy_select_ident(struct sk_buff *skb);
diff --git a/net/ipv6/output_core.c b/net/ipv6/output_core.c
index a86cf60..74581f7 100644
--- a/net/ipv6/output_core.c
+++ b/net/ipv6/output_core.c
@@ -9,7 +9,8 @@
#include <net/addrconf.h>
#include <net/secure_seq.h>
-u32 __ipv6_select_ident(u32 hashrnd, struct in6_addr *dst, struct in6_addr *src)
+static u32 __ipv6_select_ident(u32 hashrnd, struct in6_addr *dst,
+ struct in6_addr *src)
{
u32 hash, id;
--
1.9.3
^ permalink raw reply related
* [PATCH 1/2] ipv6: Resolve sparce error with fragment id selection
From: Vladislav Yasevich @ 2015-02-05 14:41 UTC (permalink / raw)
To: netdev; +Cc: Vladislav Yasevich
In-Reply-To: <1423147297-4757-1-git-send-email-vyasevic@redhat.com>
Resolve the following sparce error:
net/ipv6/output_core.c:57:38: sparse: incorrect type in assignment
(different base types)
net/ipv6/output_core.c:57:38: expected restricted __be32
[usertype] ip6_frag_id
net/ipv6/output_core.c:57:38: got unsigned int [unsigned]
[assigned] [usertype] id
Fixes: 0508c07f5e0c9 (ipv6: Select fragment id during UFO segmentation
if not set.)
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
---
net/ipv6/output_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/output_core.c b/net/ipv6/output_core.c
index 54520a0..a86cf60 100644
--- a/net/ipv6/output_core.c
+++ b/net/ipv6/output_core.c
@@ -54,7 +54,7 @@ void ipv6_proxy_select_ident(struct sk_buff *skb)
id = __ipv6_select_ident(ip6_proxy_idents_hashrnd,
&addrs[1], &addrs[0]);
- skb_shinfo(skb)->ip6_frag_id = id;
+ skb_shinfo(skb)->ip6_frag_id = htonl(id);
}
EXPORT_SYMBOL_GPL(ipv6_proxy_select_ident);
--
1.9.3
^ permalink raw reply related
* [PATCH 0/2] IPv6 Fix 2 small issues with UFO restoration code
From: Vladislav Yasevich @ 2015-02-05 14:41 UTC (permalink / raw)
To: netdev; +Cc: Vladislav Yasevich
This series fixes 2 small issues introduced by the
"Restore UFO support to virtio_net devices" series.
Thanks.
Vladislav Yasevich (2):
ipv6: Resolve sparce error with fragment id selection
ipv6: Make __ipv6_select_ident static
include/net/ipv6.h | 2 --
net/ipv6/output_core.c | 5 +++--
2 files changed, 3 insertions(+), 4 deletions(-)
--
1.9.3
^ permalink raw reply
* Re: Throughput regression with `tcp: refine TSO autosizing`
From: Eric Dumazet @ 2015-02-05 14:41 UTC (permalink / raw)
To: Michal Kazior
Cc: Neal Cardwell, linux-wireless, Network Development,
eyalpe-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb
In-Reply-To: <CA+BoTQmcShK0U_cXvEOLY_8y7LH8x3taTgjcyMzv0MLVn4UtCA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Thu, 2015-02-05 at 14:44 +0100, Michal Kazior wrote:
> Ok. I tried calling skb_orphan() right after I submit each Tx frame
> (similar to niu which does this in start_xmit):
>
> --- a/drivers/net/wireless/ath/ath10k/htt_tx.c
> +++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
> @@ -564,6 +564,8 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct
> sk_buff *msdu)
> if (res)
> goto err_unmap_msdu;
>
> + skb_orphan(msdu);
> +
> return 0;
>
> err_unmap_msdu:
>
>
> Now, with {net/master + ath10k GRO + the above} I get 620mbps on a
> single flow (even better then before). Wow.
>
> Does this look ok/safe as a solution to you?
Not at all. This basically removes backpressure.
A single UDP socket can now blast packets regardless of SO_SNDBUF
limits.
This basically remove years of work trying to fix bufferbloat.
I still do not understand why increasing tcp_limit_output_bytes is not
working for you.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH net 0/2] netns: audit netdevice creation with IFLA_NET_NS_[PID|FD]
From: Nicolas Dichtel @ 2015-02-05 14:34 UTC (permalink / raw)
To: Arvid Brodin, netdev; +Cc: davem, dmitry.tarnyagin, alex.aring, linux-wpan
In-Reply-To: <54D28237.9060009@alten.se>
Le 04/02/2015 21:33, Arvid Brodin a écrit :
> On 2015-02-02 16:58, Nicolas Dichtel wrote:
>> Le 30/01/2015 21:00, Arvid Brodin a écrit :
>>> On 2015-01-26 22:28, Nicolas Dichtel wrote:
[snip]
> Ok, so x-netns simply means cross-netns?
Yes
>
[snip]
>> Now, the question is: does HSR really work across netns? Why is the flag
>> NETIF_F_NETNS_LOCAL set?
>> dev_forward_skb() may be used to forward an skbuff to another netns.
>
> Here is the code snippet that sets NETIF_F_NETNS_LOCAL:
> /* Not sure about this. Taken from bridge code. netdev_features.h says
> * it means "Does not change network namespaces".
> */
> dev->features |= NETIF_F_NETNS_LOCAL;
>
> HSR is a bit like a bridge since it forwards packets between interfaces on the
> same Ethernet network, and the bridge code sets NETIF_F_NETNS_LOCAL. And that's
> really all the reason for the inclusion of the flag - i.e. it should be removed
> if it doesn't make sense.
>
> So, does it make sense? I'm not sure exactly, but I don't think it makes sense
> to have slaves that are in different namespaces - they are supposed to be part
> of the same ethernet network after all. But maybe having the HSR interface in a
> different namespace than the two slaves could make sense - this way you could
> force an application to only communicate using the HSR protocol, and not use any
> of the slave interfaces directly.
>
> If you agree with the above, then I guess that means NETIF_F_NETNS_LOCAL should
> not be set?
It's ok for me. But I think some tests should be done. Usually,
dev_forward_skb() or skb_scrub_packet() are called to clean structures when a
skb crosses netns.
^ permalink raw reply
* Re: [ovs-dev] [RFC: add openvswitch actions using BPF 9/9] ofproto-dpif-xlate: generate BPF output action (Hack)
From: Thomas Graf @ 2015-02-05 14:29 UTC (permalink / raw)
To: Andy Zhou; +Cc: dev, netdev
In-Reply-To: <1423090163-19902-10-git-send-email-azhou@nicira.com>
On 02/04/15 at 02:49pm, Andy Zhou wrote:
> This is a hack in xlate code to always generate both BPF output
> and the original output action. Since the currnet BPF output 'action'
> simply generate a kenrel log message about the output port number.
>
> With this patch, Every time datapath output a packet, it also generate
> log about the port number in the kernel log.
This sounds great. Having the possibility the overwrite existing
datapath actions with BPF programs sounds like an excellent first
step towards BPF usage in the datapath.
^ permalink raw reply
* [PATCH] ixgbe: fix sparse warnings
From: Lad Prabhakar @ 2015-02-05 14:27 UTC (permalink / raw)
To: Jeff Kirsher, Jesse Brandeburg, Bruce Allan, Carolyn Wyborny,
Don Skidmore, Greg Rose, Matthew Vick, John Ronciak,
Mitch Williams, Linux NICS, e1000-devel
Cc: netdev, linux-kernel, Lad, Prabhakar
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
this patch fixes following sparse warnings:
ixgbe_x550.c:83:5: warning: symbol 'ixgbe_init_eeprom_params_X550' was not declared. Should it be static?
ixgbe_x550.c:113:5: warning: symbol 'ixgbe_read_iosf_sb_reg_x550' was not declared. Should it be static?
ixgbe_x550.c:161:5: warning: symbol 'ixgbe_read_ee_hostif_data_X550' was not declared. Should it be static?
ixgbe_x550.c:196:5: warning: symbol 'ixgbe_read_ee_hostif_buffer_X550' was not declared. Should it be static?
ixgbe_x550.c:334:5: warning: symbol 'ixgbe_calc_checksum_X550' was not declared. Should it be static?
ixgbe_x550.c:410:5: warning: symbol 'ixgbe_calc_eeprom_checksum_X550' was not declared. Should it be static?
ixgbe_x550.c:422:5: warning: symbol 'ixgbe_read_ee_hostif_X550' was not declared. Should it be static?
ixgbe_x550.c:443:5: warning: symbol 'ixgbe_validate_eeprom_checksum_X550' was not declared. Should it be static?
ixgbe_x550.c:492:5: warning: symbol 'ixgbe_write_ee_hostif_data_X550' was not declared. Should it be static?
ixgbe_x550.c:520:5: warning: symbol 'ixgbe_write_ee_hostif_X550' was not declared. Should it be static?
ixgbe_x550.c:540:5: warning: symbol 'ixgbe_update_flash_X550' was not declared. Should it be static?
ixgbe_x550.c:563:5: warning: symbol 'ixgbe_update_eeprom_checksum_X550' was not declared. Should it be static?
ixgbe_x550.c:603:5: warning: symbol 'ixgbe_write_ee_hostif_buffer_X550' was not declared. Should it be static?
ixgbe_x550.c:633:6: warning: symbol 'ixgbe_init_mac_link_ops_X550em' was not declared. Should it be static?
ixgbe_x550.c:650:5: warning: symbol 'ixgbe_setup_sfp_modules_X550em' was not declared. Should it be static?
ixgbe_x550.c:706:5: warning: symbol 'ixgbe_get_link_capabilities_X550em' was not declared. Should it be static?
ixgbe_x550.c:743:5: warning: symbol 'ixgbe_write_iosf_sb_reg_x550' was not declared. Should it be static?
ixgbe_x550.c:907:5: warning: symbol 'ixgbe_setup_kx4_x550em' was not declared. Should it be static?
ixgbe_x550.c:945:5: warning: symbol 'ixgbe_setup_kr_x550em' was not declared. Should it be static?
ixgbe_x550.c:990:5: warning: symbol 'ixgbe_setup_internal_phy_x550em' was not declared. Should it be static?
ixgbe_x550.c:1052:5: warning: symbol 'ixgbe_init_phy_ops_X550em' was not declared. Should it be static?
ixgbe_x550.c:1105:23: warning: symbol 'ixgbe_get_media_type_X550em' was not declared. Should it be static?
ixgbe_x550.c:1132:5: warning: symbol 'ixgbe_init_ext_t_x550em' was not declared. Should it be static?
ixgbe_x550.c:1205:5: warning: symbol 'ixgbe_reset_hw_X550em' was not declared. Should it be static?
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
Found this issue on linux-next (gcc version 4.9.2,
sparse version 0.4.5-rc1)and applies on top linux-next.
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 64 ++++++++++++++-------------
1 file changed, 34 insertions(+), 30 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
index ffdd123..b0eb764 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
@@ -80,7 +80,7 @@ static s32 ixgbe_write_phy_reg_x550em(struct ixgbe_hw *hw, u32 reg_addr,
* Initializes the EEPROM parameters ixgbe_eeprom_info within the
* ixgbe_hw struct in order to set up EEPROM access.
**/
-s32 ixgbe_init_eeprom_params_X550(struct ixgbe_hw *hw)
+static s32 ixgbe_init_eeprom_params_X550(struct ixgbe_hw *hw)
{
struct ixgbe_eeprom_info *eeprom = &hw->eeprom;
u32 eec;
@@ -110,8 +110,8 @@ s32 ixgbe_init_eeprom_params_X550(struct ixgbe_hw *hw)
* @device_type: 3 bit device type
* @phy_data: Pointer to read data from the register
**/
-s32 ixgbe_read_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr,
- u32 device_type, u32 *data)
+static s32 ixgbe_read_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr,
+ u32 device_type, u32 *data)
{
u32 i, command, error;
@@ -158,7 +158,8 @@ s32 ixgbe_read_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr,
*
* Reads a 16 bit word from the EEPROM using the hostif.
**/
-s32 ixgbe_read_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, u16 *data)
+static s32 ixgbe_read_ee_hostif_data_X550(struct ixgbe_hw *hw,
+ u16 offset, u16 *data)
{
s32 status;
struct ixgbe_hic_read_shadow_ram buffer;
@@ -193,8 +194,8 @@ s32 ixgbe_read_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, u16 *data)
*
* Reads a 16 bit word(s) from the EEPROM using the hostif.
**/
-s32 ixgbe_read_ee_hostif_buffer_X550(struct ixgbe_hw *hw,
- u16 offset, u16 words, u16 *data)
+static s32 ixgbe_read_ee_hostif_buffer_X550(struct ixgbe_hw *hw,
+ u16 offset, u16 words, u16 *data)
{
struct ixgbe_hic_read_shadow_ram buffer;
u32 current_word = 0;
@@ -331,7 +332,8 @@ static s32 ixgbe_checksum_ptr_x550(struct ixgbe_hw *hw, u16 ptr,
*
* Returns a negative error code on error, or the 16-bit checksum
**/
-s32 ixgbe_calc_checksum_X550(struct ixgbe_hw *hw, u16 *buffer, u32 buffer_size)
+static s32 ixgbe_calc_checksum_X550(struct ixgbe_hw *hw, u16 *buffer,
+ u32 buffer_size)
{
u16 eeprom_ptrs[IXGBE_EEPROM_LAST_WORD + 1];
u16 *local_buffer;
@@ -407,7 +409,7 @@ s32 ixgbe_calc_checksum_X550(struct ixgbe_hw *hw, u16 *buffer, u32 buffer_size)
*
* Returns a negative error code on error, or the 16-bit checksum
**/
-s32 ixgbe_calc_eeprom_checksum_X550(struct ixgbe_hw *hw)
+static s32 ixgbe_calc_eeprom_checksum_X550(struct ixgbe_hw *hw)
{
return ixgbe_calc_checksum_X550(hw, NULL, 0);
}
@@ -419,7 +421,7 @@ s32 ixgbe_calc_eeprom_checksum_X550(struct ixgbe_hw *hw)
*
* Reads a 16 bit word from the EEPROM using the hostif.
**/
-s32 ixgbe_read_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 *data)
+static s32 ixgbe_read_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 *data)
{
s32 status = 0;
@@ -440,7 +442,8 @@ s32 ixgbe_read_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 *data)
* Performs checksum calculation and validates the EEPROM checksum. If the
* caller does not need checksum_val, the value can be NULL.
**/
-s32 ixgbe_validate_eeprom_checksum_X550(struct ixgbe_hw *hw, u16 *checksum_val)
+static s32 ixgbe_validate_eeprom_checksum_X550(struct ixgbe_hw *hw,
+ u16 *checksum_val)
{
s32 status;
u16 checksum;
@@ -489,7 +492,8 @@ s32 ixgbe_validate_eeprom_checksum_X550(struct ixgbe_hw *hw, u16 *checksum_val)
*
* Write a 16 bit word to the EEPROM using the hostif.
**/
-s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, u16 data)
+static s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw,
+ u16 offset, u16 data)
{
s32 status;
struct ixgbe_hic_write_shadow_ram buffer;
@@ -517,7 +521,7 @@ s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, u16 data)
*
* Write a 16 bit word to the EEPROM using the hostif.
**/
-s32 ixgbe_write_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 data)
+static s32 ixgbe_write_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 data)
{
s32 status = 0;
@@ -537,7 +541,7 @@ s32 ixgbe_write_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 data)
*
* Issue a shadow RAM dump to FW to copy EEPROM from shadow RAM to the flash.
**/
-s32 ixgbe_update_flash_X550(struct ixgbe_hw *hw)
+static s32 ixgbe_update_flash_X550(struct ixgbe_hw *hw)
{
s32 status = 0;
union ixgbe_hic_hdr2 buffer;
@@ -560,7 +564,7 @@ s32 ixgbe_update_flash_X550(struct ixgbe_hw *hw)
* checksum and updates the EEPROM and instructs the hardware to update
* the flash.
**/
-s32 ixgbe_update_eeprom_checksum_X550(struct ixgbe_hw *hw)
+static s32 ixgbe_update_eeprom_checksum_X550(struct ixgbe_hw *hw)
{
s32 status;
u16 checksum = 0;
@@ -600,8 +604,8 @@ s32 ixgbe_update_eeprom_checksum_X550(struct ixgbe_hw *hw)
*
* Write a 16 bit word(s) to the EEPROM using the hostif.
**/
-s32 ixgbe_write_ee_hostif_buffer_X550(struct ixgbe_hw *hw,
- u16 offset, u16 words, u16 *data)
+static s32 ixgbe_write_ee_hostif_buffer_X550(struct ixgbe_hw *hw,
+ u16 offset, u16 words, u16 *data)
{
s32 status = 0;
u32 i = 0;
@@ -630,7 +634,7 @@ s32 ixgbe_write_ee_hostif_buffer_X550(struct ixgbe_hw *hw,
/** ixgbe_init_mac_link_ops_X550em - init mac link function pointers
* @hw: pointer to hardware structure
**/
-void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw)
+static void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw)
{
struct ixgbe_mac_info *mac = &hw->mac;
@@ -647,7 +651,7 @@ void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw)
/** ixgbe_setup_sfp_modules_X550em - Setup SFP module
* @hw: pointer to hardware structure
*/
-s32 ixgbe_setup_sfp_modules_X550em(struct ixgbe_hw *hw)
+static s32 ixgbe_setup_sfp_modules_X550em(struct ixgbe_hw *hw)
{
bool setup_linear;
u16 reg_slice, edc_mode;
@@ -703,9 +707,9 @@ s32 ixgbe_setup_sfp_modules_X550em(struct ixgbe_hw *hw)
* @speed: pointer to link speed
* @autoneg: true when autoneg or autotry is enabled
**/
-s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
- ixgbe_link_speed *speed,
- bool *autoneg)
+static s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
+ ixgbe_link_speed *speed,
+ bool *autoneg)
{
/* SFP */
if (hw->phy.media_type == ixgbe_media_type_fiber) {
@@ -740,8 +744,8 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
* @device_type: 3 bit device type
* @data: Data to write to the register
**/
-s32 ixgbe_write_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr,
- u32 device_type, u32 data)
+static s32 ixgbe_write_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr,
+ u32 device_type, u32 data)
{
u32 i, command, error;
@@ -904,7 +908,7 @@ static s32 ixgbe_setup_ixfi_x550em(struct ixgbe_hw *hw, ixgbe_link_speed *speed)
*
* Configures the integrated KX4 PHY.
**/
-s32 ixgbe_setup_kx4_x550em(struct ixgbe_hw *hw)
+static s32 ixgbe_setup_kx4_x550em(struct ixgbe_hw *hw)
{
s32 status;
u32 reg_val;
@@ -942,7 +946,7 @@ s32 ixgbe_setup_kx4_x550em(struct ixgbe_hw *hw)
*
* Configures the integrated KR PHY.
**/
-s32 ixgbe_setup_kr_x550em(struct ixgbe_hw *hw)
+static s32 ixgbe_setup_kr_x550em(struct ixgbe_hw *hw)
{
s32 status;
u32 reg_val;
@@ -987,7 +991,7 @@ s32 ixgbe_setup_kr_x550em(struct ixgbe_hw *hw)
* A return of a non-zero value indicates an error, and the base driver should
* not report link up.
**/
-s32 ixgbe_setup_internal_phy_x550em(struct ixgbe_hw *hw)
+static s32 ixgbe_setup_internal_phy_x550em(struct ixgbe_hw *hw)
{
u32 status;
u16 lasi, autoneg_status, speed;
@@ -1049,7 +1053,7 @@ s32 ixgbe_setup_internal_phy_x550em(struct ixgbe_hw *hw)
* set during init_shared_code because the PHY/SFP type was
* not known. Perform the SFP init if necessary.
**/
-s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw)
+static s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw)
{
struct ixgbe_phy_info *phy = &hw->phy;
s32 ret_val;
@@ -1102,7 +1106,7 @@ s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw)
* Returns the media type (fiber, copper, backplane)
*
*/
-enum ixgbe_media_type ixgbe_get_media_type_X550em(struct ixgbe_hw *hw)
+static enum ixgbe_media_type ixgbe_get_media_type_X550em(struct ixgbe_hw *hw)
{
enum ixgbe_media_type media_type;
@@ -1129,7 +1133,7 @@ enum ixgbe_media_type ixgbe_get_media_type_X550em(struct ixgbe_hw *hw)
/** ixgbe_init_ext_t_x550em - Start (unstall) the external Base T PHY.
** @hw: pointer to hardware structure
**/
-s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw)
+static s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw)
{
u32 status;
u16 reg;
@@ -1202,7 +1206,7 @@ s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw)
** and clears all interrupts, perform a PHY reset, and perform a link (MAC)
** reset.
**/
-s32 ixgbe_reset_hw_X550em(struct ixgbe_hw *hw)
+static s32 ixgbe_reset_hw_X550em(struct ixgbe_hw *hw)
{
ixgbe_link_speed link_speed;
s32 status;
--
1.9.1
^ permalink raw reply related
* Re: [ovs-dev] [RFC: add openvswitch actions using BPF 5/9] bpf: add the first BPF program.
From: Thomas Graf @ 2015-02-05 14:18 UTC (permalink / raw)
To: Andy Zhou; +Cc: dev, netdev
In-Reply-To: <1423090163-19902-6-git-send-email-azhou@nicira.com>
First of all, I *love* this. I have some questions on versioning of
helpers in the kernel. I will put comments in the respective kernel
patches directly.
On 02/04/15 at 02:49pm, Andy Zhou wrote:
> +EXTRA_DIST += $(srcdir)/bpf/ovs-bpf-helpers.h \
> + $(srcdir)/bpf/bpf-shared.h \
> + $(srcdir)/bpf/ovs-actions.c
> +
> +DEP_FILES = $(srcdir)/bpf/ovs-bpf-helpers.h \
> + $(srcdir)/bpf/bpf-shared.h \
> + $(srcdir)/datapath/linux/compat/include/linux/openvswitch.h
Some tab / space mixing here.
> +bpf/ovs-actions.bpf: $(srcdir)/bpf/ovs-actions.c $(DEP_FILES)
> + $(AM_V_GEN)clang -DHAVE_CONFIG_H $(BPF_INCLUDES) $(NOSTDINC_FLAGS) \
> + $(AM_CFLAGS) $(EXTRA_CFLAGS) -Wno-unused-value -Wno-pointer-sign \
> + -O2 -emit-llvm -c $< -o -| $(LLC) -filetype=obj -o $@
I assume you will convert this to a Makefile template
^ permalink raw reply
* Re: [ovs-dev] [RFC: add openvswitch actions using BPF 2/9] odp: add a new ODP action: OVS_ACTION_ATTR_BPF_PROG
From: Thomas Graf @ 2015-02-05 14:11 UTC (permalink / raw)
To: Andy Zhou; +Cc: dev, netdev
In-Reply-To: <1423090163-19902-3-git-send-email-azhou@nicira.com>
On 02/04/15 at 02:49pm, Andy Zhou wrote:
> +struct ovs_action_bpf_prog {
> + __be32 prog_fd;
> + __be32 arg0;
> + __be32 arg1;
> +};
Given the 64 bit registers of BPF. Should we have all args in the
Netlink message be 64 bit as well?
^ permalink raw reply
* [PATCH net] ipv6: addrconf: add missing validate_link_af handler
From: Daniel Borkmann @ 2015-02-05 13:39 UTC (permalink / raw)
To: davem; +Cc: netdev, Daniel Borkmann, Jiri Pirko
We still need a validate_link_af() handler with an appropriate nla policy,
similarly as we have in IPv4 case, otherwise size validations are not being
done properly in that case.
Fixes: f53adae4eae5 ("net: ipv6: add tokenized interface identifier support")
Fixes: bc91b0f07ada ("ipv6: addrconf: implement address generation modes")
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
---
net/ipv6/addrconf.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index f7c8bbe..dac9419 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4572,6 +4572,22 @@ static int inet6_set_iftoken(struct inet6_dev *idev, struct in6_addr *token)
return 0;
}
+static const struct nla_policy inet6_af_policy[IFLA_INET6_MAX + 1] = {
+ [IFLA_INET6_ADDR_GEN_MODE] = { .type = NLA_U8 },
+ [IFLA_INET6_TOKEN] = { .len = sizeof(struct in6_addr) },
+};
+
+static int inet6_validate_link_af(const struct net_device *dev,
+ const struct nlattr *nla)
+{
+ struct nlattr *tb[IFLA_INET6_MAX + 1];
+
+ if (dev && !__in6_dev_get(dev))
+ return -EAFNOSUPPORT;
+
+ return nla_parse_nested(tb, IFLA_INET6_MAX, nla, inet6_af_policy);
+}
+
static int inet6_set_link_af(struct net_device *dev, const struct nlattr *nla)
{
int err = -EINVAL;
@@ -5393,6 +5409,7 @@ static struct rtnl_af_ops inet6_ops = {
.family = AF_INET6,
.fill_link_af = inet6_fill_link_af,
.get_link_af_size = inet6_get_link_af_size,
+ .validate_link_af = inet6_validate_link_af,
.set_link_af = inet6_set_link_af,
};
--
1.9.3
^ permalink raw reply related
* Re: [PATCH net-next 2/3] IB/mlx4: Always use the correct port for mirrored multicast attachments
From: Sergei Shtylyov @ 2015-02-05 14:04 UTC (permalink / raw)
To: Or Gerlitz, David S. Miller
Cc: netdev, Roland Dreier, Amir Vadai, Tal Alon, Moni Shoua
In-Reply-To: <1423144366-11814-3-git-send-email-ogerlitz@mellanox.com>
Hello.
On 2/5/2015 4:52 PM, Or Gerlitz wrote:
> From: Moni Shoua <monis@mellanox.com>
> When attaching a QP to a multicast address in bonded mode, there was an
> assumption that the port of the QP must be #1. This assumption isn't the
> case under the flow which enables maximal usage of the physical ports.
> Fix it by always checking the port of the original flow and create the
> mirrored flow on the other port.
> Fixes: c6215745b66a ("IB/mlx4: Load balance ports in port aggregation mode")
> Signed-off-by: Moni Shoua <monis@mellanox.com>
> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
> ---
> drivers/infiniband/hw/mlx4/main.c | 8 ++++++--
> 1 files changed, 6 insertions(+), 2 deletions(-)
> diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
> index 2ed5b99..271d3f1 100644
> --- a/drivers/infiniband/hw/mlx4/main.c
> +++ b/drivers/infiniband/hw/mlx4/main.c
> @@ -1186,6 +1186,9 @@ static struct ib_flow *mlx4_ib_create_flow(struct ib_qp *qp,
> goto err_create_flow;
> i++;
> if (is_bonded) {
> + /* Application always sees one port so the mirror rule
> + * must be on port #2
> + */
Unrelated change?
> flow_attr->port = 2;
> err = __mlx4_ib_create_flow(qp, flow_attr,
> domain, type[j],
> @@ -1279,14 +1282,15 @@ static int mlx4_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
>
> err = mlx4_multicast_attach(mdev->dev, &mqp->mqp, gid->raw, mqp->port,
> !!(mqp->flags &
> - MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK),
> + MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK),
This change is both unrelated and unneeded.
> prot, ®_id.id);
> if (err)
> goto err_malloc;
>
> reg_id.mirror = 0;
> if (mlx4_is_bonded(dev)) {
> - err = mlx4_multicast_attach(mdev->dev, &mqp->mqp, gid->raw, 2,
> + err = mlx4_multicast_attach(mdev->dev, &mqp->mqp, gid->raw,
> + (mqp->port == 1) ? 2 : 1,
I doubt that these parens are needed.
WBR, Sergei
^ permalink raw reply
* Re: [PATCH] xen-netback: fix sparse warning
From: Wei Liu @ 2015-02-05 14:01 UTC (permalink / raw)
To: Lad Prabhakar; +Cc: Ian Campbell, Wei Liu, xen-devel, netdev, linux-kernel
In-Reply-To: <1423143487-4722-1-git-send-email-prabhakar.csengg@gmail.com>
On Thu, Feb 05, 2015 at 01:38:07PM +0000, Lad Prabhakar wrote:
> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>
> this patch fixes following sparse warning:
>
> interface.c:83:5: warning: symbol 'xenvif_poll' was not declared. Should it be static?
>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Thanks!
> ---
> Found this issue on linux-next (gcc version 4.9.2,
> sparse version 0.4.5-rc1)and applies on top linux-next.
>
> drivers/net/xen-netback/interface.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
> index 12f9e27..f38227a 100644
> --- a/drivers/net/xen-netback/interface.c
> +++ b/drivers/net/xen-netback/interface.c
> @@ -80,7 +80,7 @@ static irqreturn_t xenvif_tx_interrupt(int irq, void *dev_id)
> return IRQ_HANDLED;
> }
>
> -int xenvif_poll(struct napi_struct *napi, int budget)
> +static int xenvif_poll(struct napi_struct *napi, int budget)
> {
> struct xenvif_queue *queue =
> container_of(napi, struct xenvif_queue, napi);
> --
> 1.9.1
^ permalink raw reply
* Re: [ovs-dev] [RFC: add openvswitch actions using BPF 2/9] odp: add a new ODP action: OVS_ACTION_ATTR_BPF_PROG
From: Thomas Graf @ 2015-02-05 13:56 UTC (permalink / raw)
To: Andy Zhou; +Cc: dev, netdev
In-Reply-To: <1423090163-19902-3-git-send-email-azhou@nicira.com>
On 02/04/15 at 02:49pm, Andy Zhou wrote:
> /**
> + * struct ovs_action_bpf_prog - %OVS_ACTION_ATTR_BPF_PROG action argument.
> + *
> + * XXX provides bpf program id and execution context.
> + *
> + */
> +struct ovs_action_bpf_prog {
> + __be32 prog_fd;
> + __be32 arg0;
> + __be32 arg1;
> +};
I assume you intend to replace this with a nested Netlink attribute with a
series of U32 attributes to carry args in the future?
> +enum ovs_bpf_func_id {
> + OVS_BPF_FUNC_unspec,
> + OVS_BPF_FUNC_output, /* int ovs_bpf_output(ctxt) */
> + __OVS_BPF_FUNC_MAX_ID,
> +};
The mix of cap / no-cap looks a bit weird.
> +static void
> +format_bpf_prog_action(struct ds *ds, const struct nlattr *a)
> +{
> + struct ovs_action_bpf_prog *bpf_act = (struct ovs_action_bpf_prog *)
> + nl_attr_get(a);
> +
> + ds_put_cstr(ds, "bpf");
> + ds_put_format(ds, "(%u,%u,%u)", ntohl(bpf_act->prog_fd),
> + ntohl(bpf_act->arg0), ntohl(bpf_act->arg1));
> +}
Maybe ds_put_format(ds, "bpf(... ?
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox