* Re: [PATCH 3/4 net-next] net: bcmgenet: precalculate TxCB->bd_addr
From: Florian Fainelli @ 2014-12-09 20:05 UTC (permalink / raw)
To: Petri Gynther, netdev; +Cc: davem
In-Reply-To: <20141204041150.A54952200C7@puck.mtv.corp.google.com>
On 03/12/14 20:11, Petri Gynther wrote:
> There is 1-to-1 mapping between TxCBs and TxBDs. Precalculate TxCB->bd_addr
> once in bcmgenet_init_dma() instead of doing it over and over needlessly in
> bcmgenet_get_txcb().
Nice cleanup, thanks!
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
>
> Signed-off-by: Petri Gynther <pgynther@google.com>
> ---
--
Florian
^ permalink raw reply
* Re: [PATCH 2/4 net-next] net: bcmgenet: rework Tx queue init
From: Florian Fainelli @ 2014-12-09 20:02 UTC (permalink / raw)
To: Petri Gynther, netdev; +Cc: davem
In-Reply-To: <20141204041140.8D0612200C7@puck.mtv.corp.google.com>
On 03/12/14 20:11, Petri Gynther wrote:
> 1. Rename bcmgenet_init_multiq() to bcmgenet_init_tx_queues()
> 2. Move Tx default queue init inside bcmgenet_init_tx_queues()
One minor nit, see below, once resolved, feel free to add a:
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
>
> Signed-off-by: Petri Gynther <pgynther@google.com>
> ---
> drivers/net/ethernet/broadcom/genet/bcmgenet.c | 82 +++++++++++---------------
> 1 file changed, 36 insertions(+), 46 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
> index 78ab733..eba310a 100644
> --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
> +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
> @@ -1776,78 +1776,74 @@ static int bcmgenet_init_rx_ring(struct bcmgenet_priv *priv,
> return ret;
> }
>
> -/* init multi xmit queues, only available for GENET2+
> - * the queue is partitioned as follows:
> +/*
> + * Initialize Tx queues
This looks good to me, but same comment as David made, you are modifying
the comment style, and this is no longer conforming to what the network
drivers are using.
--
Florian
^ permalink raw reply
* Re: [PATCH net-next 2/2] tcp_cubic: refine Hystart delay threshold
From: David Miller @ 2014-12-09 19:58 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, nanditad, ncardwell, ycheng, sangtae.ha
In-Reply-To: <1417738429.22424.29.camel@edumazet-glaptop2.roam.corp.google.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 04 Dec 2014 16:13:49 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> In commit 2b4636a5f8ca ("tcp_cubic: make the delay threshold of HyStart
> less sensitive"), HYSTART_DELAY_MIN was changed to 4 ms.
>
> The remaining problem is that using delay_min + (delay_min/16) as the
> threshold is too sensitive.
>
> 6.25 % of variation is too small for rtt above 60 ms, which are not
> uncommon.
...
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next 1/2] tcp_cubic: add SNMP counters to track how effective is Hystart
From: David Miller @ 2014-12-09 19:58 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, nanditad, ncardwell, ycheng, sangtae.ha
In-Reply-To: <1417738403.22424.28.camel@edumazet-glaptop2.roam.corp.google.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 04 Dec 2014 16:13:23 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> When deploying FQ pacing, one thing we noticed is that CUBIC Hystart
> triggers too soon.
>
> Having SNMP counters to have an idea of how often the various Hystart
> methods trigger is useful prior to any modifications.
>
> This patch adds SNMP counters tracking, how many time "ack train" or
> "Delay" based Hystart triggers, and cumulative sum of cwnd at the time
> Hystart decided to end SS (Slow Start)
>
> myhost:~# nstat -a | grep Hystart
> TcpExtTCPHystartTrainDetect 9 0.0
> TcpExtTCPHystartTrainCwnd 20650 0.0
> TcpExtTCPHystartDelayDetect 10 0.0
> TcpExtTCPHystartDelayCwnd 360 0.0
>
> ->
> Train detection was triggered 9 times, and average cwnd was
> 20650/9=2294,
> Delay detection was triggered 10 times and average cwnd was 36
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [PATCH] x86: bpf_jit_comp: Remove inline from static function definitions
From: David Miller @ 2014-12-09 19:57 UTC (permalink / raw)
To: joe
Cc: eric.dumazet, alexei.starovoitov, lambert.quentin, kuznet,
jmorris, yoshfuji, kaber, tglx, mingo, hpa, x86, netdev,
linux-kernel
In-Reply-To: <1417741284.2721.26.camel@perches.com>
From: Joe Perches <joe@perches.com>
Date: Thu, 04 Dec 2014 17:01:24 -0800
> Let the compiler decide instead.
>
> No change in object size x86-64 -O2 no profiling
>
> Signed-off-by: Joe Perches <joe@perches.com>
> Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH] x86: bpf_jit_comp: Reduce is_ereg() code size
From: David Miller @ 2014-12-09 19:57 UTC (permalink / raw)
To: joe
Cc: alexei.starovoitov, lambert.quentin, kuznet, jmorris, yoshfuji,
kaber, tglx, mingo, hpa, x86, netdev, linux-kernel
In-Reply-To: <1417734048.2721.22.camel@perches.com>
From: Joe Perches <joe@perches.com>
Date: Thu, 04 Dec 2014 15:00:48 -0800
> Use the (1 << reg) & mask trick to reduce code size.
>
> x86-64 size difference -O2 without profiling for various
> gcc versions:
>
> $ size arch/x86/net/bpf_jit_comp.o*
> text data bss dec hex filename
> 9266 4 0 9270 2436 arch/x86/net/bpf_jit_comp.o.4.4.new
> 10042 4 0 10046 273e arch/x86/net/bpf_jit_comp.o.4.4.old
> 9109 4 0 9113 2399 arch/x86/net/bpf_jit_comp.o.4.6.new
> 9717 4 0 9721 25f9 arch/x86/net/bpf_jit_comp.o.4.6.old
> 8789 4 0 8793 2259 arch/x86/net/bpf_jit_comp.o.4.7.new
> 10245 4 0 10249 2809 arch/x86/net/bpf_jit_comp.o.4.7.old
> 9671 4 0 9675 25cb arch/x86/net/bpf_jit_comp.o.4.9.new
> 10679 4 0 10683 29bb arch/x86/net/bpf_jit_comp.o.4.9.old
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied.
^ permalink raw reply
* Re: [PATCH v2 0/6] net-PPP: Deletion of a few unnecessary checks
From: David Miller @ 2014-12-09 19:54 UTC (permalink / raw)
To: elfring
Cc: sergei.shtylyov, paulus, linux-ppp, netdev, eric.dumazet,
linux-kernel, kernel-janitors, julia.lawall
In-Reply-To: <5480DA32.8000201@users.sourceforge.net>
From: SF Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 04 Dec 2014 23:03:30 +0100
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 4 Dec 2014 22:50:28 +0100
>
> Further update suggestions were taken into account before and after a patch
> was applied from static source code analysis.
Generally speaking, it is advisable to not leave error pointers in data
structures, even if they are about to be free'd up in an error path
anyways.
Therefore I do not like some of the patches in this series.
Sorry.
^ permalink raw reply
* Re: [PATCH net v3 1/6] cxgb4i: fix tx credit calculation
From: Sergei Shtylyov @ 2014-12-09 19:54 UTC (permalink / raw)
To: Karen Xie, linux-scsi, netdev
Cc: hariprasad, anish, hch, James.Bottomley, michaelc, davem
In-Reply-To: <201412091732.sB9HWHRm008996@localhost6.localdomain6>
Hello.
On 12/09/2014 08:32 PM, Karen Xie wrote:
> [PATCH net v3 1/6] cxgb4i: fix tx credit calculation
> From: Karen Xie <kxie@chelsio.com>
> - Only data skbs need the wr header added while control skbs do not. Make sure they are treated differently.
> - Any credit related checking should be done before adding the wr header.
Looks like a spearate issue deserving its own patch?
> - Fixed compiler warning resulted from added cxgbi_skb_test_flag() call in is_ofld_imm().
Isn't it called cxgbi_skcb_test_flag()?
> Signed-off-by: Karen Xie <kxie@chelsio.com>
> ---
> drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 26 +++++++++++++++++---------
> drivers/scsi/cxgbi/libcxgbi.h | 4 ++--
> 2 files changed, 19 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
> index 1508125..5c3f15d 100644
> --- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
> +++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
[...]
> @@ -544,15 +548,17 @@ static inline void make_tx_data_wr(struct cxgbi_sock *csk, struct sk_buff *skb,
> unsigned int submode = cxgbi_skcb_ulp_mode(skb) & 3;
> unsigned int wr_ulp_mode = 0;
>
> - req = (struct fw_ofld_tx_data_wr *)__skb_push(skb, sizeof(*req));
> -
Perhaps it makes sense to store the result of is_ofld_imm() before
__skb_push() call
instead of duplicating the same call in 2 branches?
> if (is_ofld_imm(skb)) {
> + req = (struct fw_ofld_tx_data_wr *)__skb_push(skb,
> + sizeof(*req));
The continuation line should start right under 'skb' on the previous line.
> req->op_to_immdlen = htonl(FW_WR_OP(FW_OFLD_TX_DATA_WR) |
> FW_WR_COMPL(1) |
> FW_WR_IMMDLEN(dlen));
> req->flowid_len16 = htonl(FW_WR_FLOWID(csk->tid) |
> FW_WR_LEN16(credits));
> } else {
> + req = (struct fw_ofld_tx_data_wr *)__skb_push(skb,
> + sizeof(*req));
Likewise.
> req->op_to_immdlen =
> cpu_to_be32(FW_WR_OP(FW_OFLD_TX_DATA_WR) |
> FW_WR_COMPL(1) |
> @@ -597,12 +603,14 @@ static int push_tx_frames(struct cxgbi_sock *csk, int req_completion)
>
> skb_reset_transport_header(skb);
> if (is_ofld_imm(skb))
> - credits_needed = DIV_ROUND_UP(dlen +
> - sizeof(struct fw_ofld_tx_data_wr), 16);
> + credits_needed = DIV_ROUND_UP(dlen, 16);
> else
> - credits_needed = DIV_ROUND_UP(8*calc_tx_flits_ofld(skb)
> - + sizeof(struct fw_ofld_tx_data_wr),
> - 16);
> + credits_needed = DIV_ROUND_UP(8*calc_tx_flits_ofld(skb),
It would have been good if you added spaces around *, while at it, to keep
it consistent with the general kernel coding style...
[...]
WBR, Sergei
^ permalink raw reply
* Re: [patch net-next] net: sched: cls: remove unused op put from tcf_proto_ops
From: David Miller @ 2014-12-09 19:49 UTC (permalink / raw)
To: jiri; +Cc: netdev, jhs
In-Reply-To: <1417725678-24968-1-git-send-email-jiri@resnulli.us>
From: Jiri Pirko <jiri@resnulli.us>
Date: Thu, 4 Dec 2014 21:41:18 +0100
> It is never called and implementations are void. So just remove it.
>
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH net] amd-xgbe: Prevent Tx cleanup stall
From: David Miller @ 2014-12-09 19:48 UTC (permalink / raw)
To: thomas.lendacky; +Cc: netdev
In-Reply-To: <20141204175235.11100.52433.stgit@tlendack-t1.amdoffice.net>
From: Tom Lendacky <thomas.lendacky@amd.com>
Date: Thu, 4 Dec 2014 11:52:35 -0600
> When performing Tx cleanup, the dirty index counter is compared to the
> current index counter as one of the tests used to determine when to stop
> cleanup. The "less than" test will fail when the current index counter
> rolls over to zero causing cleanup to never occur again. Update the test
> to a "not equal" to avoid this situation.
>
> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Applied.
^ permalink raw reply
* Re: [PATCH 1/1] net: dsa: Fix of kernel panic in case of missing PHY.
From: Sergei Shtylyov @ 2014-12-09 19:45 UTC (permalink / raw)
To: Andrey Volkov, netdev; +Cc: Florian Fainelli
In-Reply-To: <54873205.30401@nexvision.fr>
Hello.
On 12/09/2014 08:31 PM, Andrey Volkov wrote:
> Fix of kernel panic in case of missing PHY.
> Signed-off-by: Andrey Volkov <andrey.volkov@nexvision.fr>
> ---
> net/dsa/slave.c | 19 +++++++++++++++----
> 1 file changed, 15 insertions(+), 4 deletions(-)
> diff --git a/net/dsa/slave.c b/net/dsa/slave.c
> index 528380a..6f89caa 100644
> --- a/net/dsa/slave.c
> +++ b/net/dsa/slave.c
[...]
> @@ -555,12 +555,17 @@ static void dsa_slave_phy_setup(struct dsa_slave_priv *p,
> */
> if (!p->phy) {
> p->phy = ds->slave_mii_bus->phy_map[p->port];
> - phy_connect_direct(slave_dev, p->phy, dsa_slave_adjust_link,
> + if(p->phy)
Space is needed after *if*. Run your patches thru scripts/checkpatch.pl,
it should detect such coding style issues.
> + phy_connect_direct(slave_dev, p->phy, dsa_slave_adjust_link,
> p->phy_interface);
This continuation line should be realigned now, to start right under
'slave_dev' on the previous line.
[...]
WBR, Sergei
^ permalink raw reply
* Re: [PATCH v2 1/1] net: dsa: replacing the hard-coded sized array "dsa_switch" by dynamic one
From: David Miller @ 2014-12-09 19:45 UTC (permalink / raw)
To: andrey.volkov; +Cc: f.fainelli, netdev
In-Reply-To: <548083B8.5090900@nexvision.fr>
From: Andrey Volkov <andrey.volkov@nexvision.fr>
Date: Thu, 04 Dec 2014 16:54:32 +0100
> @@ -732,7 +730,8 @@ static int dsa_probe(struct platform_device *pdev)
> goto out;
> }
>
> - dst = kzalloc(sizeof(*dst), GFP_KERNEL);
> + dst = kzalloc(sizeof(*dst) +
> + sizeof(struct dsa_switch *) * pd->nr_chips, GFP_KERNEL);
Your email client has completely corrupted your patch. For one thing it
has transformed TAB characters into spaces.
Please read Documentation/email-clients.txt, email the patch to yourself,
and then try to successfully apply the patch you receive in that email.
If it doesn't work for you, it won't work for us either.
Do not resubmit this patch until your have fully resolved this, thanks.
^ permalink raw reply
* Re: [PATCH net-next 06/10] net/mlx4: Add mlx4_bitmap zone allocator
From: David Miller @ 2014-12-09 19:42 UTC (permalink / raw)
To: ogerlitz; +Cc: netdev, matanb, amirv, talal, jackm
In-Reply-To: <1417698835-11050-7-git-send-email-ogerlitz@mellanox.com>
From: Or Gerlitz <ogerlitz@mellanox.com>
Date: Thu, 4 Dec 2014 15:13:51 +0200
> +static u32 mlx4_bitmap_max(struct mlx4_bitmap *bitmap)
> +{
> + return bitmap->max;
> +}
> +
> +static u32 mlx4_bitmap_effective_len(struct mlx4_bitmap *bitmap)
> +{
> + return bitmap->effective_len;
> +}
Using functions for just accessing structure members is excessive, please
just open code this.
Thanks.
^ permalink raw reply
* Re: [PATCH net-next 02/10] net/mlx4_core: Mask out host side virtualization features for guests
From: David Miller @ 2014-12-09 19:40 UTC (permalink / raw)
To: ogerlitz; +Cc: netdev, matanb, amirv, talal, jackm
In-Reply-To: <1417698835-11050-3-git-send-email-ogerlitz@mellanox.com>
From: Or Gerlitz <ogerlitz@mellanox.com>
Date: Thu, 4 Dec 2014 15:13:47 +0200
> @@ -1053,6 +1053,11 @@ int mlx4_QUERY_DEV_CAP_wrapper(struct mlx4_dev *dev, int slave,
> field &= ~0x80;
> MLX4_PUT(outbox->buf, field, QUERY_DEV_CAP_FLOW_STEERING_IPOIB_OFFSET);
>
> + /* turn off host side virt features (VST, FSM, etc) for guests */
> + MLX4_GET(field32, outbox->buf, QUERY_DEV_CAP_EXT_2_FLAGS_OFFSET);
> + field32 &= ~((1 << 26) | (1 << 21) | (1 << 20));
> + MLX4_PUT(outbox->buf, field32, QUERY_DEV_CAP_EXT_2_FLAGS_OFFSET);
> +
Please use mnenomics instead of magic constants for this, thanks.
^ permalink raw reply
* Re: [PATCH net-next] arch_fast_hash: avoid indirect function calls and implement hash in asm
From: David Miller @ 2014-12-09 19:39 UTC (permalink / raw)
To: hannes; +Cc: netdev, herbert, jay.vosburgh, tgraf, dborkman, eric.dumazet
In-Reply-To: <e77237174e1b8d743ef5171e05abde82bc54af37.1417696901.git.hannes@stressinduktion.org>
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
Date: Thu, 4 Dec 2014 14:08:50 +0100
> By default the arch_fast_hash hashing function pointers are initialized
> to jhash(2). If during boot-up a CPU with SSE4.2 is detected they get
> updated to the CRC32 ones. This dispatching scheme incurs a function
> pointer lookup and indirect call for every hashing operation.
>
> To keep the number of clobbered registers short the hashing primitives
> are implemented in assembler. This makes it easier to do the dispatch
> by alternative_call.
>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: Jay Vosburgh <jay.vosburgh@canonical.com>
> Cc: Thomas Graf <tgraf@suug.ch>
> Cc: Daniel Borkmann <dborkman@redhat.com>
> Cc: Eric Dumazet <eric.dumazet@gmail.com>
> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
I'm not applying this, I want this whole facility removed instead.
^ permalink raw reply
* Re: [PATCH net] netlink: use jhash as hashfn for rhashtable
From: David Miller @ 2014-12-09 19:38 UTC (permalink / raw)
To: dborkman; +Cc: netdev, herbert, tgraf, hannes
In-Reply-To: <1418056230-8700-1-git-send-email-dborkman@redhat.com>
From: Daniel Borkmann <dborkman@redhat.com>
Date: Mon, 8 Dec 2014 17:30:30 +0100
> For netlink, we shouldn't be using arch_fast_hash() as a hashing
> discipline, but rather jhash() instead.
>
> Since netlink sockets can be opened by any user, a local attacker
> would be able to easily create collisions with the DPDK-derived
> arch_fast_hash(), which trades off performance for security by
> using crc32 CPU instructions on x86_64.
>
> While it might have a legimite use case in other places, it should
> be avoided in netlink context, though. As rhashtable's API is very
> flexible, we could later on still decide on other hashing disciplines,
> if legitimate.
>
> Reference: http://thread.gmane.org/gmane.linux.kernel/1844123
> Fixes: e341694e3eb5 ("netlink: Convert netlink_lookup() to use RCU protected hash table")
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: Thomas Graf <tgraf@suug.ch>
> Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
I think I've seen enough of this.
First of all, you've left all of the example initializers in the
rhashtable implementation recommending to use arch_fast_hash.
Secondly, after this, openvswitch (and nfsd, ugh) are the only users
remaining. Even though there have been claims that using this
doesn't expose to openvswitch to being hash attackable, I'm still
not entirely convinced that an attacker cannot hurt performance
of an OVS node as a result of this.
I think this whole scheme should be reverted, whatever cycles
openvswitch gains by using crc32c instructions is far outweighed
by the confusion this has caused and all of this infrastructure
created for just one or two users.
Someone send me a patch to revert all of the arch_fast_hash
stuff, and every reference thereof, or else I'll do it myself.
Thanks.
^ permalink raw reply
* Re: [PATCH net-next] bnx2x: Use correct fastpath version for VFs.
From: David Miller @ 2014-12-09 19:29 UTC (permalink / raw)
To: Yuval.Mintz; +Cc: netdev, Ariel.Elior
In-Reply-To: <1417690326-11422-1-git-send-email-Yuval.Mintz@qlogic.com>
From: Yuval Mintz <Yuval.Mintz@qlogic.com>
Date: Thu, 4 Dec 2014 12:52:06 +0200
> Our FW can support several fastpath HSI [for backward compatibility] but up
> until now VFs were always configured to use latest fastpath HSI [although VF
> driver might be older and use an older fastpath HSI].
>
> For linux drivers, the differences are insignificant since driver never
> utilized features that were overridden by the HSI change. But for VMs running
> other operating systems this might be a problem.
> In addition, eventually FW might change fastpath HSI in such a manner that
> backward compatibility WILL break unless configured with proper version.
>
> This patch fixes the issue for other operating system VMs, as well as lays
> the ground work for forward compatibility in regard to the fastpath HSI.
>
> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Applied, thanks.
^ permalink raw reply
* Re: pull request: wireless 2014-12-03
From: Larry Finger @ 2014-12-09 19:08 UTC (permalink / raw)
To: David Miller, linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <20141209.133602.1849817956610567109.davem@davemloft.net>
On 12/09/2014 12:36 PM, David Miller wrote:
> From: "John W. Linville" <linville@tuxdriver.com>
> Date: Wed, 3 Dec 2014 15:34:33 -0500
>
>> One last(?) batch of fixes hoping to make 3.18...
>>
>> In this episode, we have another trio of rtlwifi fixes
>> repairing a little more damage from the major update of the
>> rtlwifi-family of drivers. These editing mistakes caused some
>> memory corruption and missed a flag critical to proper interrupt
>> handling. Together, these fix the kernel regression reported at
>> https://bugzilla.kernel.org/show_bug.cgi?id=88951 by Catalin Iacob.
>>
>> Please let me know if there are problems!
>
> Unfortunately, this did not make it for 3.18, but I've pulled it into my
> 'net' tree which I'll merge into 'net-next' for the merge window.
I knew those were very late. Thanks for letting us know that they did not make
it in time. I will watch for them to reach mainline, and then send a message
requesting that they be backported to 3.18.X.
Larry
^ permalink raw reply
* Re: [net-next 13/13] i40e/i40evf: Convert macro to static inline
From: Sergei Shtylyov @ 2014-12-09 19:06 UTC (permalink / raw)
To: Jeff Kirsher, davem; +Cc: netdev, nhorman, sassmann, jogreene
In-Reply-To: <1418124170-7495-14-git-send-email-jeffrey.t.kirsher@intel.com>
Hello.
On 12/09/2014 02:22 PM, Jeff Kirsher wrote:
> Inline functions are preferred over macros when they can be used
> interchangeably.
> Reported-by: Joe Perches <joe@perches.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_type.h | 5 ++++-
> drivers/net/ethernet/intel/i40evf/i40e_type.h | 5 ++++-
> 2 files changed, 8 insertions(+), 2 deletions(-)
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h
> index 844421f..618cce2 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_type.h
> +++ b/drivers/net/ethernet/intel/i40e/i40e_type.h
> @@ -481,7 +481,10 @@ struct i40e_hw {
> u32 debug_mask;
> };
>
> -#define i40e_is_vf(_hw) ((_hw)->mac.type == I40E_MAC_VF)
> +static inline bool i40e_is_vf(struct i40e_hw *hw)
> +{
> + return (hw->mac.type == I40E_MAC_VF);
Parens not needed.
[...]
> diff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h
> index d8175cd..6b6fcf6 100644
> --- a/drivers/net/ethernet/intel/i40evf/i40e_type.h
> +++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h
> @@ -475,7 +475,10 @@ struct i40e_hw {
> u32 debug_mask;
> };
>
> -#define i40e_is_vf(_hw) ((_hw)->mac.type == I40E_MAC_VF)
> +static inline bool i40e_is_vf(struct i40e_hw *hw)
> +{
> + return (hw->mac.type == I40E_MAC_VF);
Likewise.
[...]
WBR, Sergei
^ permalink raw reply
* Re: linux-next 20141208 - net/sched/sch_fq_codel.c:97 suspicious RCU
From: Eric Dumazet @ 2014-12-09 19:00 UTC (permalink / raw)
To: Valdis Kletnieks; +Cc: John Fastabend, David S. Miller, linux-kernel, netdev
In-Reply-To: <9914.1418151288@turing-police.cc.vt.edu>
On Tue, Dec 9, 2014 at 10:54 AM, <Valdis.Kletnieks@vt.edu> wrote:
> You want a patch, or you got it already?
>
If you could submit it formally, this would be great , thanks !
diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
index b9ca32ebc1de..1e52decb7b59 100644
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
@@ -94,7 +94,7 @@ static unsigned int fq_codel_classify(struct sk_buff
*skb, struct Qdisc *sch,
TC_H_MIN(skb->priority) <= q->flows_cnt)
return TC_H_MIN(skb->priority);
- filter = rcu_dereference(q->filter_list);
+filter = rcu_dereference_bh(q->filter_list);
if (!filter)
return fq_codel_hash(q, skb) + 1;
^ permalink raw reply related
* Re: linux-next 20141208 - net/sched/sch_fq_codel.c:97 suspicious RCU
From: Valdis.Kletnieks @ 2014-12-09 18:54 UTC (permalink / raw)
To: Eric Dumazet; +Cc: John Fastabend, David S. Miller, linux-kernel, netdev
In-Reply-To: <CANn89iJAN815z3TefSjj0uZyQQyH-wTiAckt3WeMc-F7DRgpKA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 410 bytes --]
On Tue, 09 Dec 2014 10:07:31 -0800, Eric Dumazet said:
> On Tue, Dec 9, 2014 at 9:51 AM, Valdis Kletnieks
> > commit 46e5da40aec256155cfedee96dd21a75da941f2c
> > Author: John Fastabend <john.fastabend@gmail.com>
> > Date: Fri Sep 12 20:04:52 2014 -0700
>
> Well, its a (harmless) typo : this should really be an
> rcu_dereference_bh() instead of rcu_dereference()
You want a patch, or you got it already?
[-- Attachment #2: Type: application/pgp-signature, Size: 848 bytes --]
^ permalink raw reply
* Re: [PATCHv11 net-next 2/2] openvswitch: Add support for unique flow IDs.
From: David Miller @ 2014-12-09 18:47 UTC (permalink / raw)
To: pshelar; +Cc: joestringer, netdev, linux-kernel, dev
In-Reply-To: <CALnjE+o4tbQVTyVkzdOG8zj=qxPZ8Dv3vGHbYkBmghxsLgKkkw@mail.gmail.com>
Please do not quote an entire patch just to add some simple feedback or
signoff/ack.
That means someone has to scroll past the entire patch in patchwork or
the mailing list archives, unnecessarily.
This is one of my largest pet peeves, please do not do this.
Thanks.
^ permalink raw reply
* Re: [PATCH] net: tulip: Remove private "strncmp"
From: David Miller @ 2014-12-09 18:45 UTC (permalink / raw)
To: linux; +Cc: grundler, netdev, linux-kernel
In-Reply-To: <1417689040-14958-1-git-send-email-linux@rasmusvillemoes.dk>
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Date: Thu, 4 Dec 2014 11:30:40 +0100
> The comment says that the built-in strncmp didn't work. That is not
> surprising, as apparently "str" semantics are not really what is
> wanted (hint: de4x5_strncmp only stops when two different bytes are
> encountered or the end is reached; not if either byte happens to be
> 0). de4x5_strncmp is actually a memcmp (except for the signature and
> that bytes are not necessarily treated as unsigned char); since only
> the boolean value of the result is used we can just replace
> de4x5_strncmp with memcmp.
>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH v2] drivers: net : cpsw: Update Kconfig for CPSW
From: David Miller @ 2014-12-09 18:44 UTC (permalink / raw)
To: lokeshvutla
Cc: netdev, mugunthanvnm, linux-omap, grygorii.strashko, balbi,
nsekhar, t-kristo
In-Reply-To: <1417668869-25616-1-git-send-email-lokeshvutla@ti.com>
From: Lokesh Vutla <lokeshvutla@ti.com>
Date: Thu, 4 Dec 2014 10:24:29 +0530
> CPSW is present in AM33xx, AM43xx, DRA7xx.
> Updating the Kconfig to depend on ARCH_OMAP2PLUS instead of listing
> all SoC's.
>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Applied to net-next, thanks.
^ permalink raw reply
* [PATCHv1 net] xen-netfront: use correct linear area after linearizing an skb
From: David Vrabel @ 2014-12-09 18:43 UTC (permalink / raw)
To: netdev; +Cc: David Vrabel, xen-devel, Konrad Rzeszutek Wilk, Boris Ostrovsky
Commit 97a6d1bb2b658ac85ed88205ccd1ab809899884d (xen-netfront: Fix
handling packets on compound pages with skb_linearize) attempted to
fix a problem where an skb that would have required too many slots
would be dropped causing TCP connections to stall.
However, it filled in the first slot using the original buffer and not
the new one and would use the wrong offset and grant access to the
wrong page.
Netback would notice the malformed request and stop all traffic on the
VIF, reporting:
vif vif-3-0 vif3.0: txreq.offset: 85e, size: 4002, end: 6144
vif vif-3-0 vif3.0: fatal error; disabling device
Reported-by: Anthony Wright <anthony@overnetdata.com>
Tested-by: Anthony Wright <anthony@overnetdata.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
---
drivers/net/xen-netfront.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index ece8d18..eeed0ce 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -627,6 +627,9 @@ static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev)
slots, skb->len);
if (skb_linearize(skb))
goto drop;
+ data = skb->data;
+ offset = offset_in_page(data);
+ len = skb_headlen(skb);
}
spin_lock_irqsave(&queue->tx_lock, flags);
--
1.7.10.4
^ permalink raw reply related
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