Carlos,
On Thu, Nov 30, 2017 at 11:53 PM, James Hogan wrote:
> On Tue, Nov 28, 2017 at 04:55:35PM -0800, David Daney wrote:
>> From: Carlos Munoz
>>
>> Add a global resource manager to manage tagged pointers within
>> bootmem allocated memory. This is used by various functional
>> blocks in the
There is no real need for the users of timecounters to define cyclecounter
and timecounter variables separately. Since timecounter will always be
based on cyclecounter, have cyclecounter struct as member of timecounter
struct.
Suggested-by: Chris Wilson
Signed-off-by: Sagar Arun Kamble
Cc: Chris
On 12/1/2017 2:33 AM, Saeed Mahameed wrote:
On Mon, Nov 27, 2017 at 2:05 AM, Sagar Arun Kamble
wrote:
On 11/24/2017 7:01 PM, Thomas Gleixner wrote:
On Fri, 24 Nov 2017, Sagar Arun Kamble wrote:
On 11/24/2017 12:29 AM, Thomas Gleixner wrote:
On Thu, 23 Nov 2017, Sagar Arun Kamble wrote:
W
On Wed, Nov 22, 2017 at 08:05:00AM -0800, syzbot wrote:
> syzkaller has found reproducer for the following crash on
> 0c86a6bd85ff0629cd2c5141027fc1c8bb6cde9c
> git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master
> compiler: gcc (GCC) 7.1.1 20170620
> .config is attached
> Raw c
My Sincere Greetings,
I am (MRS.LOUISA BENICIO); I have decided to donate what I have to you
/ Motherless babies/ Less privileged/ Churches/ Widows' because I am
dying and diagnosed for cancer for two years now. I have been touched
by Almighty God to donate from what I have inherited from my late
On Wed, Nov 29, 2017 at 6:25 AM, Paolo Abeni wrote:
> Currently deleting qdisc with a large number of children and filters
> can take a lot of time:
>
> tc qdisc add dev lo root htb
> for I in `seq 1 1000`; do
> tc class add dev lo parent 1: classid 1:$I htb rate 100kbit
> tc qdisc
On 2017年12月01日 13:54, w...@redhat.com wrote:
From: Wei Xu
Matthew found a roughly 40% tcp throughput regression with commit
c67df11f(vhost_net: try batch dequing from skb array) as discussed
in the following thread:
https://www.mail-archive.com/netdev@vger.kernel.org/msg187936.html
Eventuall
On 2017年12月01日 13:54, w...@redhat.com wrote:
From: Wei Xu
tap_recvmsg() supports accepting skb by msg_control after
commit 3b4ba04acca8 ("tap: support receiving skb from msg_control"),
the skb if presented should be freed within the function, otherwise
it would be leaked.
Signed-off-by: Wei
On Tue, Nov 28, 2017 at 07:55:41PM +0200, av...@mellanox.com wrote:
> From: Aviv Heller
>
> Adding the state to the offload device prior to replay init in
> xfrm_state_construct() will result in NULL dereference if a matching
> ESP packet is received in between.
>
> In order to inhibit driver of
On 2017年12月01日 13:54, w...@redhat.com wrote:
From: Wei Xu
tun_recvmsg() supports accepting skb by msg_control after
commit ac77cfd4258f ("tun: support receiving skb through msg_control"),
the skb if presented should be freed within the function, otherwise it
would be leaked.
Signed-off-by: W
On Tue, Nov 28, 2017 at 07:55:42PM +0200, av...@mellanox.com wrote:
> From: Aviv Heller
>
> x is already initialized to the same value, above.
>
> Signed-off-by: Aviv Heller
> Signed-off-by: Yevgeny Kliteynik
Applied to ipsec-next, thanks!
On Tue, Nov 28, 2017 at 07:55:40PM +0200, av...@mellanox.com wrote:
> From: Aviv Heller
>
> Code path when (encap_type < 0) does not verify the state is valid
> before progressing.
>
> This will result in a crash if, for instance, x->km.state ==
> XFRM_STATE_ACQ.
>
> Fixes: 7785bba299a8 ("esp:
On Tue, Nov 28, 2017 at 11:49:30AM +0200, yoss...@mellanox.com wrote:
> From: Yossef Efraim
>
> This patch adds ESN support to IPsec device offload.
> Adding new xfrm device operation to synchronize device ESN.
>
> Signed-off-by: Yossef Efraim
> ---
> include/linux/netdevice.h | 1 +
> includ
On Tue, Nov 28, 2017 at 11:49:29AM +0200, yoss...@mellanox.com wrote:
> From: Yossef Efraim
>
> xfrm_dev_state_add function returns success for unsupported HW SA options.
> Resulting the calling function to create SW SA without corrlating HW SA.
> Desipte IPSec device offloading option was chosen
On Tue, Nov 28, 2017 at 11:49:28AM +0200, yoss...@mellanox.com wrote:
> From: Yossef Efraim
>
> In case of wrap around, replay_esn->oseq_hi is not updated
> before it is tested for it's actual value, leading function
> to fail with overflow indication and packets being dropped.
>
> This patch up
On (11/30/17 19:26), Sergey Senozhatsky wrote:
> On (11/30/17 10:23), David Laight wrote:
> [..]
> > > Maybe I'm being thick, but... if we're rendering these addresses
> > > unusable by hashing them, why not just print something like
> > > "" in their place? That loses the uniqueness thing but I
On Wed, Nov 29, 2017 at 06:23:56PM +0100, Michal Kubecek wrote:
> This seems to be an obvious typo, NLA_U32 is type of the attribute, not its
> (minimal) length.
>
> Fixes: 077fbac405bf ("net: xfrm: support setting an output mark.")
> Signed-off-by: Michal Kubecek
Patch applied, thanks Michal!
From: Wei Xu
tap_recvmsg() supports accepting skb by msg_control after
commit 3b4ba04acca8 ("tap: support receiving skb from msg_control"),
the skb if presented should be freed within the function, otherwise
it would be leaked.
Signed-off-by: Wei Xu
Reported-by: Matthew Rosato
---
drivers/net
From: Wei Xu
Matthew found a roughly 40% tcp throughput regression with commit
c67df11f(vhost_net: try batch dequing from skb array) as discussed
in the following thread:
https://www.mail-archive.com/netdev@vger.kernel.org/msg187936.html
Eventually we figured out that it was a skb leak in handle
From: Wei Xu
Matthew found a roughly 40% tcp throughput regression with commit
c67df11f(vhost_net: try batch dequing from skb array) as discussed
in the following thread:
https://www.mail-archive.com/netdev@vger.kernel.org/msg187936.html
This is v3.
v3:
- move freeing skb from vhost to tun/tap
From: Wei Xu
tun_recvmsg() supports accepting skb by msg_control after
commit ac77cfd4258f ("tun: support receiving skb through msg_control"),
the skb if presented should be freed within the function, otherwise it
would be leaked.
Signed-off-by: Wei Xu
Reported-by: Matthew Rosato
---
drivers/
On Mon, Nov 20, 2017 at 02:26:07PM -0800, Shannon Nelson wrote:
> Add a writeup on how to use the XFRM device offload API, and
> mention this new file in the index.
>
> Signed-off-by: Shannon Nelson
Applied to ipsec-next, thanks a lot for this documentation!
On Mon, Nov 20, 2017 at 07:26:02PM +0900, Lorenzo Colitti wrote:
> Currently it is possible to add or update socket policies, but
> not clear them. Therefore, once a socket policy has been applied,
> the socket cannot be used for unencrypted traffic.
>
> This patch allows (privileged) users to cle
From: Jiong Wang
When immed is used with No-Dest, the emitter should use reg.dst instead of
reg.areg for the destination, using the latter will actually encode
register zero.
Signed-off-by: Jiong Wang
Reviewed-by: Jakub Kicinski
---
drivers/net/ethernet/netronome/nfp/bpf/jit.c | 8 +---
1
From: Jiong Wang
For NFP, we want to re-group a sequence of load/store pairs lowered from
memcpy/memmove into single memory bulk operation which then could be
accelerated using NFP CPP bus.
This patch extends the existing load/store auxiliary information by adding
two new fields:
struct
From: Jiong Wang
If any of the shift insns in the ld/shift sequence is jump destination,
don't do combination.
Signed-off-by: Jiong Wang
Reviewed-by: Jakub Kicinski
---
drivers/net/ethernet/netronome/nfp/bpf/jit.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/ne
From: Jiong Wang
When the gathered copy length is bigger than 32-bytes and within 128-bytes
(the maximum length a single CPP Pull/Push request can finish), the
strategy of read/write are changeed into:
* Read.
- use direct reference mode when length is within 32-bytes.
- use indire
From: Jiong Wang
eBPF insns are internally organized as dual-list inside NFP offload JIT.
Random access to an insn needs to be done by either forward or backward
traversal along the list.
One place we need to do such traversal is at nfp_fixup_branches where one
traversal is needed for each jump
From: Jiong Wang
The NFP normally requires the source operands to be difference addressing
modes, but we should rule out the very special NN_REG_NONE type.
There are instruction that ignores both A/B operands, for example:
local_csr_rd
For these instructions, we might pass the same operand t
From: Jiong Wang
NFP eBPF offload JIT engine is doing some instruction combine based
optimizations which however must not be safe if the combined sequences
are across basic block boarders.
Currently, there are post checks during fixing jump destinations. If the
jump destination is found to be eB
Since commit 3a025e1d1c2e ("Add optional check for bad kernel-doc
comments") when built with W=1 build will complain about kdoc errors.
Fix the kdoc issues we have. kdoc is still confused by defines in
nfp_net_ctrl.h but those are not really errors.
Signed-off-by: Jakub Kicinski
---
drivers/net
Add support for emitting commands with field overwrites.
Signed-off-by: Jakub Kicinski
Signed-off-by: Jiong Wang
---
drivers/net/ethernet/netronome/nfp/bpf/jit.c | 17 +
drivers/net/ethernet/netronome/nfp/nfp_asm.h | 3 ++-
2 files changed, 15 insertions(+), 5 deletions(-)
dif
From: Jiong Wang
It is usual that we need to check if one BPF insn is for loading/storeing
data from/to memory.
Therefore, it makes sense to factor out related code to become common
helper functions.
Signed-off-by: Jiong Wang
Reviewed-by: Jakub Kicinski
---
drivers/net/ethernet/netronome/nfp
From: Jiong Wang
If the mask insn in the ld/mask pair is jump destination, then don't do
combination.
Signed-off-by: Jiong Wang
Reviewed-by: Jakub Kicinski
---
drivers/net/ethernet/netronome/nfp/bpf/jit.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/netronome/nf
From: Jiong Wang
This patch add the optimization frontend, but adding a new eBPF IR scan
pass "nfp_bpf_opt_ldst_gather".
The pass will traverse the IR to recognize the load/store pairs sequences
that come from lowering of memory copy builtins.
The gathered memory copy information will be kept i
Hi!
Jiong says:
Currently, compiler will lower memcpy function call in XDP/eBPF C program
into a sequence of eBPF load/store pairs for some scenarios.
Compiler is thinking this "inline" optimiation is beneficial as it could
avoid function call and also increase code locality.
However, Netronome
From: Jiong Wang
This patch adds support for backward jump on NFP.
- restrictions on backward jump in various functions have been removed.
- nfp_fixup_branches now supports backward jump.
There is one thing to note, currently an input eBPF JMP insn may generate
several NFP insns, for exampl
when verifier hits an internal bug don't mark register R10==FP as uninit,
since it's read only register and it's not technically correct to let
verifier run further, since it may assume that R10 has valid auxiliary state.
While developing subsequent patches this issue was discovered,
though the co
don't pass large struct bpf_reg_state by value.
Instead pass it by pointer.
Signed-off-by: Alexei Starovoitov
Acked-by: John Fastabend
Acked-by: Daniel Borkmann
---
kernel/bpf/verifier.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/kernel/bpf/verif
Small set of verifier improvements and cleanups which is
necessary for bigger patch set of bpf-to-bpf calls coming later.
See individual patches for details.
Tested on x86 and arm64 hw.
Alexei Starovoitov (7):
bpf: fix stack state printing in verifier log
bpf: print liveness info to verifier l
fix incorrect stack state prints in print_verifier_state()
Fixes: 638f5b90d460 ("bpf: reduce verifier memory consumption")
Signed-off-by: Alexei Starovoitov
Acked-by: John Fastabend
Acked-by: Daniel Borkmann
---
kernel/bpf/verifier.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
verifier knows how to trim paths that are known not to be
taken at run-time when register containing run-time constant
is compared with another constant.
It was done only for JEQ comparison.
Extend it to include JNE as well.
More cases can be added in the future.
before after
registers with pointers filled from stack were missing live_written marks
which caused liveness propagation to unnecessary mark more registers as
live_read and miss state pruning opportunities later on.
before after
bpf_lb-DLB_L3.o 2285 2270
bpf_lb-DLB_L4.o 3723
since verifier started to print liveness state of the registers
adjust expected output of test_align.
Now this test checks for both proper alignment handling by verifier
and correctness of liveness marks.
Signed-off-by: Alexei Starovoitov
Acked-by: Daniel Borkmann
---
tools/testing/selftests/bp
let verifier print register and stack liveness information
into verifier log
Signed-off-by: Alexei Starovoitov
Acked-by: John Fastabend
Acked-by: Daniel Borkmann
---
kernel/bpf/verifier.c | 24
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/kernel/bpf/v
On Thu, Nov 30, 2017 at 12:48:22PM -0800, Jakub Kicinski wrote:
> On Thu, 30 Nov 2017 15:54:40 +0200, Michael S. Tsirkin wrote:
> > On Wed, Nov 29, 2017 at 07:51:38PM -0800, Jakub Kicinski wrote:
> > > On Thu, 30 Nov 2017 11:29:56 +0800, Jason Wang wrote:
> > > > On 2017年11月29日 03:27, Jesse Brand
On Fri, Dec 01, 2017 at 03:48:59AM +, Al Viro wrote:
> Something similar to get_prog_path_type() above might make for a usable
> primitive, IMO...
Incidentally, bpf_obj_get_user()/bpf_obj_do_get() should just use
user_path(), rather than wanking with
getname()+kern_path(pname->name)+putname(
On Thu, Nov 30, 2017 at 11:08 PM, Jann Horn wrote:
> On Fri, Dec 1, 2017 at 5:04 AM, Willem de Bruijn
> wrote:
>> On Thu, Nov 30, 2017 at 7:46 PM, Jann Horn wrote:
>>> Check whether inputs from userspace are too long (explicit length field too
>>> big or string not null-terminated) to avoid out-
On Fri, Dec 1, 2017 at 5:04 AM, Willem de Bruijn
wrote:
> On Thu, Nov 30, 2017 at 7:46 PM, Jann Horn wrote:
>> Check whether inputs from userspace are too long (explicit length field too
>> big or string not null-terminated) to avoid out-of-bounds reads.
>>
>> As far as I can tell, this can at wo
On Thu, Nov 30, 2017 at 7:46 PM, Jann Horn wrote:
> Check whether inputs from userspace are too long (explicit length field too
> big or string not null-terminated) to avoid out-of-bounds reads.
>
> As far as I can tell, this can at worst lead to very limited kernel heap
> memory disclosure or oop
On Thu, Nov 30, 2017 at 5:21 PM, Herbert Xu wrote:
> On Thu, Nov 30, 2017 at 05:15:16PM -0800, Tom Herbert wrote:
>>
>> We don't need a guarantee of stability, but what I am seeing is that
>> we're consisitently dropping entries on when doing a multi-part
>> netlink walk. We start iterating over t
On Fri, Dec 01, 2017 at 01:33:04AM +, Al Viro wrote:
> Use of file descriptors should be limited to "got a number from userland,
> convert to struct file *" on the way in and "install struct file * into
> descriptor table and return the descriptor to userland" on the way out.
> And the latter
This patch refactors the code of the reset feature in HCLGE layer
of HNS3 PF driver. Prime motivation to do this change is:
1. To reduce the time for which common miscellaneous Vector 0
interrupt is disabled because of the reset.
2. Simplification of reset request submission and pending reset
On 11/30/17 6:07 PM, Daniel Borkmann wrote:
On 11/30/2017 10:47 PM, Yonghong Song wrote:
cgropu+bpf prog array has a maximum number of 64 programs.
Let us apply the same limit here.
Signed-off-by: Yonghong Song
Both applied to bpf tree, thanks! Please add a proper Fixes tags in the
future;
On Thu, 30 Nov 2017 13:43:00 +, Roman Gushchin wrote:
> + attach_type = parse_attach_type(argv[2]);
> + if (attach_type == __MAX_BPF_ATTACH_TYPE) {
> + bpf_object__close(obj);
> + close(prog_fd);
> + close(cgroup_fd);
> + p_err("Invalid at
Hi Roman!
On Thu, 30 Nov 2017 13:42:57 +, Roman Gushchin wrote:
> This patchset adds basic cgroup bpf operations to bpftool.
>
> Right now there is no convenient way to perform these operations.
> The /samples/bpf/load_sock_ops.c implements attach/detacg operations,
> but only for BPF_CGROUP_
On 11/30/2017 10:47 PM, Yonghong Song wrote:
> cgropu+bpf prog array has a maximum number of 64 programs.
> Let us apply the same limit here.
>
> Signed-off-by: Yonghong Song
Both applied to bpf tree, thanks! Please add a proper Fixes tags in the
future; took care of it this time.
Hi Kirill,
On Thu, 30 Nov 2017 16:19:13 +0300, Kirill Tkhai wrote:
> > @@ -164,6 +166,38 @@ int bpf_prog_offload_compile(struct bpf_prog *prog)
> > return bpf_prog_offload_translate(prog);
> > }
> >
> > +int bpf_prog_offload_info_fill(struct bpf_prog_info *info,
> > +
From: Gao Feng
Current codes don't use skb->mark to assign flowi4_mark, it would
make the policy route rule with fwmark doesn't work as expected.
Signed-off-by: Gao Feng
---
drivers/net/ipvlan/ipvlan_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ipvlan/ipvlan_core.c b/
On Thu, 30 Nov 2017, Eric Dumazet wrote:
> On Wed, 2017-11-29 at 19:16 -0800, Casey Schaufler wrote:
> > On 11/29/2017 4:31 PM, James Morris wrote:
> > > On Wed, 29 Nov 2017, Casey Schaufler wrote:
> > >
> > > > I see that there is a proposed fix later in the thread, but I
> > > > don't see
> > >
On 11/30/2017 02:53 PM, James Hogan wrote:
On Tue, Nov 28, 2017 at 04:55:35PM -0800, David Daney wrote:
From: Carlos Munoz
Add a global resource manager to manage tagged pointers within
bootmem allocated memory. This is used by various functional
blocks in the Octeon core like the FPA, Etherne
Add a test of BPF offload control path interfaces based on
just-added netdevsim driver. Perform various checks of both
the stack and the expected driver behaviour.
Signed-off-by: Jakub Kicinski
Reviewed-by: Simon Horman
Reviewed-by: Quentin Monnet
---
tools/testing/selftests/bpf/Makefile
Some drivers enforce that flags on program replacement and
removal must match the flags passed on install. This leaves
the possibility open to enable simultaneous loading
of XDP programs both to HW and DRV.
Allow such drivers to report the flags back to the stack.
Signed-off-by: Jakub Kicinski
Hi!
The purpose of this series is to add a software model of BPF offloads
to make it easier for everyone to test them and make some of the more
arcane rules and assumptions more clear.
The series starts with 3 patches aiming to make XDP handling in the
drivers less error prone. Currently driver
netdevsim driver seems like a better place for fake SR-IOV
functionality. Remove the code previously added to dummy.
Signed-off-by: Jakub Kicinski
Reviewed-by: Quentin Monnet
---
CC: Phil Sutter
CC: Sabrina Dubroca
---
drivers/net/dummy.c | 215 +-
dummy driver was extended with VF-related netdev APIs for testing
SR-IOV-related software. netdevsim did not exist back then.
Implement SR-IOV functionality in netdevsim. Notable difference
is that since netdevsim has no module parameters, we will actually
create a device with sriov_numvfs attrib
The output parameters will get unwieldy if we want to add more
information about the program. Simply pass the entire
struct netdev_bpf in.
Signed-off-by: Jakub Kicinski
Reviewed-by: Simon Horman
Reviewed-by: Quentin Monnet
---
include/linux/netdevice.h | 3 ++-
net/core/dev.c| 24
Since day one of XDP drivers had to remember to free the program
on the remove path. This leads to code duplication and is error
prone. Make the stack query the installed programs on unregister
and if something is installed, remove the program. Freeing of
program attached to XDP generic is moved
To be able to run selftests without any hardware required we
need a software model. The model can also serve as an example
implementation for those implementing actual HW offloads.
The dummy driver have previously been extended to test SR-IOV,
but the general consensus seems to be against adding f
Add support for loading programs for netdevsim devices and
expose the related information via DebugFS. Both offload
of XDP and cls_bpf programs is supported.
Signed-off-by: Jakub Kicinski
Reviewed-by: Simon Horman
Reviewed-by: Quentin Monnet
---
drivers/net/netdevsim/Makefile| 1 +
driv
On Thu, Nov 30, 2017 at 04:57:30PM -0800, Kees Cook wrote:
> On Mon, Oct 9, 2017 at 4:10 PM, David Miller wrote:
> > Shmulik Ladkani (1):
> > netfilter: xt_bpf: Fix XT_BPF_MODE_FD_PINNED mode of 'xt_bpf_info_v1'
>
> This adds a new user of set_fs(), which we're trying to eliminate (or
> at
On Thu, Nov 30, 2017 at 05:15:16PM -0800, Tom Herbert wrote:
>
> We don't need a guarantee of stability, but what I am seeing is that
> we're consisitently dropping entries on when doing a multi-part
> netlink walk. We start iterating over the table filling in the netlink
> info. But eventually the
On Thu, Nov 30, 2017 at 4:38 PM, Herbert Xu wrote:
> On Thu, Nov 30, 2017 at 04:03:02PM -0800, Tom Herbert wrote:
>> This function is like rhashtable_walk_next except that it only returns
>> the current element in the inter and does not advance the iter.
>>
>> This patch also creates __rhashtable_
The UniPhier platform from Socionext provides the AVE ethernet
controller that includes MAC and MDIO bus supporting RGMII/RMII
modes. The controller is named AVE.
Signed-off-by: Kunihiko Hayashi
Signed-off-by: Jassi Brar
---
drivers/net/ethernet/Kconfig |1 +
drivers/net/etherne
DT bindings for the AVE ethernet controller found on Socionext's
UniPhier platforms.
Signed-off-by: Kunihiko Hayashi
Signed-off-by: Jassi Brar
Acked-by: Rob Herring
---
.../bindings/net/socionext,uniphier-ave4.txt | 48 ++
1 file changed, 48 insertions(+)
create mode
This series adds support for Socionext AVE ethernet controller implemented
on UniPhier SoCs. This driver supports RGMII/RMII modes.
v3: http://www.spinics.net/lists/netdev/msg462550.html
The PHY patch included in v1 has already separated in:
http://www.spinics.net/lists/netdev/msg454595.html
Cha
On Thu, Nov 30, 2017 at 3:12 PM, Eric Dumazet wrote:
> On Thu, 2017-11-30 at 14:53 -0800, Cong Wang wrote:
>> @@ -55,13 +54,10 @@ static void tcf_mirred_release(struct tc_action
>> *a, int bind)
>> struct tcf_mirred *m = to_mirred(a);
>> struct net_device *dev;
>>
>> - /* We could
On Mon, Oct 9, 2017 at 4:10 PM, David Miller wrote:
> Shmulik Ladkani (1):
> netfilter: xt_bpf: Fix XT_BPF_MODE_FD_PINNED mode of 'xt_bpf_info_v1'
This adds a new user of set_fs(), which we're trying to eliminate (or
at least not expand):
+ set_fs(KERNEL_DS);
+ fd = bpf_obj_get
Check whether inputs from userspace are too long (explicit length field too
big or string not null-terminated) to avoid out-of-bounds reads.
As far as I can tell, this can at worst lead to very limited kernel heap
memory disclosure or oopses.
This bug can be triggered by an unprivileged user even
On Thu, Nov 30, 2017 at 04:03:02PM -0800, Tom Herbert wrote:
> This function is like rhashtable_walk_next except that it only returns
> the current element in the inter and does not advance the iter.
>
> This patch also creates __rhashtable_walk_find_next. It finds the next
> element in the table
This is set of non critical clean ups and optimizations for TI
CPSW and ALE drivers.
Rebased on top on net-next.
Grygorii Strashko (11):
net: ethernet: ti: cpsw: drop unused var poll from
cpsw_update_channels_res
net: ethernet: ti: cpsw: use proper io apis
net: ethernet: ti: cpsw: move
Move mac_hi/lo defines in common header cpsw.h and re-use
them for netcp_ethss.c.
Signed-off-by: Grygorii Strashko
---
drivers/net/ethernet/ti/cpsw.c| 4
drivers/net/ethernet/ti/cpsw.h| 4
drivers/net/ethernet/ti/netcp_ethss.c | 5 +
3 files changed, 5 insertions(+)
CPSW platform data struct cpsw_platform_data and struct cpsw_slave_data are
used only incide cpsw.c module, so move these definitions there.
Signed-off-by: Grygorii Strashko
---
drivers/net/ethernet/ti/cpsw.c | 21 +
drivers/net/ethernet/ti/cpsw.h | 21 -
Switch to use writel_relaxed/readl_relaxed() IO API instead of raw version
as it is recommended.
Signed-off-by: Grygorii Strashko
---
drivers/net/ethernet/ti/cpsw.c | 36 ++--
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/net/ethernet/ti/
Switch to use writel_relaxed/readl_relaxed() IO API instead of raw version
as it is recommended.
Signed-off-by: Grygorii Strashko
---
drivers/net/ethernet/ti/cpsw_ale.c | 26 +-
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw_a
TI OMAP/Sitara SoCs have fixed number of ALE ports 3, which includes Host
port also.
Hence, use fixed value instead of value calcualted from DT, which can be
set by user and might not reflect actual HW configuration.
Signed-off-by: Grygorii Strashko
---
drivers/net/ethernet/ti/cpsw.c | 3 ++-
1
Use cpsw_ale_create in cpsw_ale_create(). This also makes
cpsw_ale_destroy() function nop, so remove it.
Signed-off-by: Grygorii Strashko
---
drivers/net/ethernet/ti/cpsw.c| 17 +++--
drivers/net/ethernet/ti/cpsw_ale.c| 11 +--
drivers/net/ethernet/ti/cpsw_ale.h
Move static initialization from cpsw_ale_start() to cpsw_ale_create() as it
does not make much sence to perform static initializtion in
cpsw_ale_start() which is called everytime netif[s] is opened.
Signed-off-by: Grygorii Strashko
---
drivers/net/ethernet/ti/cpsw_ale.c | 57 +++-
ALE is enabled from cpsw_ale_start() now, but disabled only from
cpsw_ale_destroy() which introduces inconsitance as cpsw_ale_start() is
called when netif[s] is opened, but cpsw_ale_destroy() is called when
driver is removed. Hence, move ALE disabling in cpsw_ale_stop().
Signed-off-by: Grygorii St
This changes calling conventions (and simplifies the hell out
the callers). New rules: once struct socket had been passed
to sock_alloc_file(), it's been consumed either by struct file
or by sock_release() done by sock_alloc_file(). Either way
the caller should not do sock_release() after that po
The ale->params.ale_ports parameter can be used to deriver values for all
ale entry mask bits: port_mask_bits, port_mask_bits, port_num_bits.
Hence, calculate above values and drop all hardcoded values. For
port_num_bits calcualtion use order_base_2() API.
Signed-off-by: Grygorii Strashko
---
dr
1) it's fput() or sock_release(), not both
2) don't do fd_install() until the last failure exit.
3) not a bug per se, but... don't attach socket to struct file
until it's set up.
Take reserving descriptor into the caller, move fd_install() to the
caller, sanitize failure exits and calling conve
Drop unused variable "poll" from cpsw_update_channels_res().
Signed-off-by: Grygorii Strashko
---
drivers/net/ethernet/ti/cpsw.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index a73600d..523c110 100644
--- a/drivers/net/e
simplifies failure exits considerably...
Signed-off-by: Al Viro
---
net/socket.c | 89 ++--
1 file changed, 38 insertions(+), 51 deletions(-)
diff --git a/net/socket.c b/net/socket.c
index 42d8e9c9ccd5..2df83c0bfde9 100644
--- a/net/socket
ALE ports number includes the Host port and ext Ports, and
ALE ports numbering starts from 0, so correct corresponding port
checks in cpsw_ale_control_set/get().
Signed-off-by: Grygorii Strashko
---
drivers/net/ethernet/ti/cpsw_ale.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
dif
Almost all sock_alloc_file() callers want sock_release()
in case of failure. Currently it consumes socket on success
(it will be destroyed on final fput() of resulting file) and
leaves it alone on failure. Making it consume socket in all
cases makes for simpler life in callers.
T
This function is like rhashtable_walk_next except that it only returns
the current element in the inter and does not advance the iter.
This patch also creates __rhashtable_walk_find_next. It finds the next
element in the table when the entry cached in iter is NULL or at the end
of a slot. __rhasht
Add two new library functions: alloc_bucket_spinlocks and
free_bucket_spinlocks. These are used to allocate and free an array
of spinlocks that are useful as locks for hash buckets. The interface
specifies the maximum number of spinlocks in the array as well
as a CPU multiplier to derive the number
Remove the code that resets the walker table. The walker table should
only be initialized in the walk init function or when a future table is
encountered. If the walker table is NULL this is the indication that
the walk has completed and this information can be used to break a
multi-call walk in th
To allocate the array of bucket locks for the hash table we now
call library function alloc_bucket_spinlocks. This function is
based on the old alloc_bucket_locks in rhashtable and should
produce the same effect.
Signed-off-by: Tom Herbert
---
lib/rhashtable.c | 47 --
1 - 100 of 341 matches
Mail list logo