Re: [PATCH][MIPS][7/7] AR7: ethernet

2007-09-06 Thread Matteo Croce
Il Friday 07 September 2007 00:30:25 Andrew Morton ha scritto: On Thu, 6 Sep 2007 17:34:10 +0200 Matteo Croce [EMAIL PROTECTED] wrote: Driver for the cpmac 100M ethernet driver. It works fine disabling napi support, enabling it gives a kernel panic when the first IPv6 packet has

[PATCH][MIPS][7/7] AR7: ethernet

2007-09-20 Thread Matteo Croce
Driver for the cpmac 100M ethernet driver. Jeff, here is the meat ;) Signed-off-by: Matteo Croce [EMAIL PROTECTED] Signed-off-by: Eugene Konev [EMAIL PROTECTED] diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 6a0863e..28ba0dc 100644 --- a/drivers/net/Kconfig +++ b/drivers/net

Re: [PATCH][MIPS][6/6] AR7: leds driver

2007-10-10 Thread Matteo Croce
The new led driver, uses leds-gpio now Signed-off-by: Matteo Croce [EMAIL PROTECTED] Signed-off-by: Nicolas Thill [EMAIL PROTECTED] diff --git a/drivers/leds/leds-ar7.c b/drivers/leds/leds-ar7.c new file mode 100644 index 000..72b958a --- /dev/null +++ b/drivers/leds/leds-ar7.c @@ -0,0

[PATCH][MIPS] AR7 ethernet

2007-10-14 Thread Matteo Croce
New version which uses less locking and drops old API Signed-off-by: Matteo Croce [EMAIL PROTECTED] Signed-off-by: Eugene Konev [EMAIL PROTECTED] Signed-off-by: Felix Fietkau [EMAIL PROTECTED] diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index e412582..5ab5d5b 100644 --- a/drivers/net

Re: [PATCH][MIPS] AR7 ethernet

2007-10-23 Thread Matteo Croce
Il Monday 15 October 2007 20:24:21 Jeff Garzik ha scritto: applied Small update to the driver, please apply Signed-off-by: Matteo Croce [EMAIL PROTECTED] Signed-off-by: Eugene Konev [EMAIL PROTECTED] Signed-off-by: Felix Fietkau [EMAIL PROTECTED] diff --git a/drivers/net/cpmac.c b/drivers/net

Re: [PATCH] add stealth mode

2015-07-02 Thread Matteo Croce
Add option to disable any reply not related to a listening socket, like RST/ACK for TCP and ICMP Port-Unreachable for UDP. Also disables ICMP replies to echo request and timestamp. The stealth mode can be enabled selectively for a single interface. Signed-off-by: Matteo Croce mat...@openwrt.org

Re: [PATCH v2] add stealth mode

2015-07-02 Thread Matteo Croce
Add option to disable any reply not related to a listening socket, like RST/ACK for TCP and ICMP Port-Unreachable for UDP. Also disables ICMP replies to echo request and timestamp. The stealth mode can be enabled selectively for a single interface. Signed-off-by: Matteo Croce mat...@openwrt.org

Re: [PATCH v2] add stealth mode

2015-07-06 Thread Matteo Croce
2015-07-06 12:49 GMT+02:00 valdis.kletni...@vt.edu: On Thu, 02 Jul 2015 10:56:01 +0200, Matteo Croce said: Add option to disable any reply not related to a listening socket, like RST/ACK for TCP and ICMP Port-Unreachable for UDP. Also disables ICMP replies to echo request and timestamp

[PATCH] add stealth mode

2015-07-01 Thread Matteo Croce
Add option to disable any reply not related to a listening socket, like RST/ACK for TCP and ICMP Dest-Unreach for UDP. Also disables ICMP replies to echo request and timestamp. The stealth mode can be enabled selectively for a single interface. --- include/linux/inetdevice.h | 1 +

Re: [PATCH v2] add stealth mode

2015-07-14 Thread Matteo Croce
-trip min/avg/max = 0.0/0.0/0.0 ms Matteo Croce OpenWrt Developer ___ __ | |.-.-.-.| | | |..| |_ | - || _ | -__| || | | || _|| _| |___|| __|_|__|__||||__| || |__| W I R E L E S S

Re: [PATCH v2] add stealth mode

2015-07-07 Thread Matteo Croce
2015-07-07 9:01 GMT+02:00 Clemens Ladisch clem...@ladisch.de: valdis.kletni...@vt.edu wrote: On Thu, 02 Jul 2015 10:56:01 +0200, Matteo Croce said: Add option to disable any reply not related to a listening socket 2) You *do* realize that this isn't anywhere near sufficient in order

Re: [PATCH v2] add stealth mode

2015-07-07 Thread Matteo Croce
2015-07-07 10:07 GMT+02:00 Hannes Frederic Sowa han...@stressinduktion.org: On Mon, Jul 6, 2015, at 21:44, Matteo Croce wrote: 2015-07-06 12:49 GMT+02:00 valdis.kletni...@vt.edu: On Thu, 02 Jul 2015 10:56:01 +0200, Matteo Croce said: Add option to disable any reply not related

Re: [PATCH v2] add stealth mode

2015-07-12 Thread Matteo Croce
2015-07-08 15:32 GMT+02:00 Austin S Hemmelgarn ahferro...@gmail.com: On 2015-07-06 15:44, Matteo Croce wrote: Just to name a few that I know of off the top of my head: 1. IP packets with any protocol number not supported by your current kernel (these return a special ICMP message). Right

[PATCH] [PATCH v3] add stealth mode

2015-09-02 Thread Matteo Croce
Add option to disable any reply not related to a listening socket, like RST/ACK for TCP and ICMP Port-Unreachable for UDP. Also disables ICMP replies to echo request and timestamp. The stealth mode can be enabled selectively for a single interface. Signed-off-by: Matteo Croce <mat...@openwrt.

[PATCH v4] add stealth mode

2015-09-16 Thread Matteo Croce
Add option to disable any reply not related to a listening socket, like RST/ACK for TCP and ICMP Port-Unreachable for UDP. Also disables ICMP replies to echo request and timestamp. The stealth mode can be enabled selectively for a single interface. Signed-off-by: Matteo Croce <mat...@openwrt.

Re: [PATCH v4] add stealth mode

2015-09-23 Thread Matteo Croce
2015-09-16 13:06 GMT+02:00 Florian Westphal <f...@strlen.de>: > > Matteo Croce <mat...@openwrt.org> wrote: > > Add option to disable any reply not related to a listening socket, > > like RST/ACK for TCP and ICMP Port-Unreachable for UDP. > > Also disables ICMP r

[PATCH v4] add stealth mode

2015-09-23 Thread Matteo Croce
Add option to disable any reply not related to a listening socket, like RST/ACK for TCP and ICMP Port-Unreachable for UDP. Also disables ICMP replies to echo request and timestamp. The stealth mode can be enabled selectively for a single interface. Signed-off-by: Matteo Croce <mat...@openwrt.

[PATCH iproute2] tc: fix typo in manpage

2017-07-07 Thread Matteo Croce
Fix a typo in the 'tc' manpage and reword some sentences. Signed-off-by: Matteo Croce <mcr...@redhat.com> --- man/man8/tc-csum.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/man8/tc-csum.8 b/man/man8/tc-csum.8 index 718301d..409ab71 100644 --- a/man/man8/tc-

[PATCH] netns: avoid directory traversal (was: ip netns: Make sure netns name is sane)

2017-07-10 Thread Matteo Croce
Hi Phil, I noticed that your patch still leaves an uncovered scenario, the one where the namespace name is "." or "..". Calling 'ip netns del ..' will remove /var/run which is a symlink to /run on most systems causing some daemons, eg. dbus, to fail. ip netns doesn't validate input, allowing

[PATCH] netns: more input validation

2017-07-25 Thread Matteo Croce
ip netns accepts invalid input as namespace name like an empty string or a string longer than the maximum file name length. Check that the netns name is not empty and less than or equal to NAME_MAX. Signed-off-by: Matteo Croce <mcr...@redhat.com> --- ip/ipnetns.c | 3 ++- 1 file chan

Re: [PATCH] netns: more input validation

2017-07-25 Thread Matteo Croce
Il giorno mar, 25/07/2017 alle 13.47 +, David Laight ha scritto: > Think I'd check: > !name[0] || !memchr(name, 0, NAME_MAX) || strchr(name, '/') || > (name[0] == '.' && (!name[1] || (name[1] == '.' && > !name[2]))) > > David Nice optimization, but as strchr() and

[RFC] net: make net.core.{r,w}mem_{default,max} namespaced

2017-07-26 Thread Matteo Croce
from the init netns has the advantage of keeping the current behaviour as the values from the init netns are used. Signed-off-by: Matteo Croce <mcr...@redhat.com> --- include/net/netns/core.h| 5 +++ include/net/sock.h | 6 include/net/tcp.h | 3 +

[PATCH v2] netns: avoid directory traversal (was: ip netns: Make sure netns name is sane)

2017-07-19 Thread Matteo Croce
namespaces (invisible to the tool). This commit denies creation or deletion of namespaces with names contaning "/" or matching exactly "." or "..". Signed-off-by: Matteo Croce <mcr...@redhat.com> --- ip/ipnetns.c | 10 ++ 1 file changed, 10 insertions(+)

[PATCH v2] Documentation: fix wrong example command

2017-06-30 Thread Matteo Croce
In the IPVLAN documentation there is an example command line where the master and slave interface names are inverted. Fix the command line and also add the optional `name' keyword to better describe what the command is doing. v2: added commit message Signed-off-by: Matteo Croce <

Re: skb allocation from interrupt handler?

2017-08-08 Thread Matteo Croce
running under RT kernel off 4.9.y > netdev_alloc_skb() passes GFP_ATOMIC to alloc_skb() so it should work in an interrupt handler too. -- Matteo Croce per aspera ad upstream

[RFC net-next] ppp: allow usage in namespaces

2017-10-09 Thread Matteo Croce
Check for CAP_NET_ADMIN with ns_capable() instead of capable() to allow usage of ppp in user namespace other than the init one. Signed-off-by: Matteo Croce <mcr...@redhat.com> --- drivers/net/ppp/ppp_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/n

[PATCH] ipv6: fix net.ipv6.conf.all.accept_dad behaviour for real

2017-10-05 Thread Matteo Croce
t_dad is 0 for the given interface *and* for all interfaces. Fixes: 35e015e1f577 ("ipv6: fix net.ipv6.conf.all interface DAD handlers") Acked-by: Stefano Brivio <sbri...@redhat.com> Signed-off-by: Matteo Croce <mcr...@redhat.com> --- net/ipv6/addrconf.c | 4 ++-- 1 file changed, 2 ins

hung task in mac80211

2017-09-06 Thread Matteo Croce
o makes the use of this more reliable since it gets rid of the allocation of the fake skb. Combined with the previous patch, this finally allows us to get rid of the pkt_type hack entirely, so do that as well. Signed-off-by: Johannes Berg <johannes.b...@intel.com> Regards, -- M

Re: hung task in mac80211

2017-09-06 Thread Matteo Croce
On Wed, Sep 6, 2017 at 2:40 PM, Stefano Brivio <sbri...@redhat.com> wrote: > On Wed, 6 Sep 2017 13:57:47 +0200 > Matteo Croce <mcr...@redhat.com> wrote: > >> Hi, >> >> I have an hung task on vanilla 4.13 kernel which I haven't on 4.12. >> The proble

Re: hung task in mac80211

2017-09-06 Thread Matteo Croce
On Wed, Sep 6, 2017 at 2:58 PM, Johannes Berg <johan...@sipsolutions.net> wrote: > On Wed, 2017-09-06 at 13:57 +0200, Matteo Croce wrote: > >> I have an hung task on vanilla 4.13 kernel which I haven't on 4.12. >> The problem is present both on my AP and on my notebook, &

[PATCH net] ipv6: fix net.ipv6.conf.all interface DAD handlers

2017-09-12 Thread Matteo Croce
at it, as we're modifying the prototype for ipv6_use_optimistic_addr(), drop inline, and let the compiler decide. Fixes: 7fd2561e4ebd ("net: ipv6: Add a sysctl to make optimistic addresses useful candidates") Signed-off-by: Matteo Croce <mcr...@redhat.com> --- Documentation/networking/ip

Re: [PATCH net] ipv6: fix net.ipv6.conf.all interface DAD handlers

2017-09-29 Thread Matteo Croce
er handlers do, eg. send_redirects. If you think that it's better to put them in AND we can change the documentation accordingly. What do you think? -- Matteo Croce per aspera ad upstream

Re: [PATCH] drivers: net: wireless: atmel: check memory allocation failure

2017-08-22 Thread Matteo Croce
> GFP_KERNEL); > > if (!m) > - return; > + return -ENOMEM; > > ret = at76_get_mib(priv->udev, MIB_MDOMAIN, m, > sizeof(struct mib_mdomain)); Perhaps these functions should return something instead of being void. Regards, -- Matteo Croce per aspera ad upstream

[PATCH net-next] icmp: don't fail on fragment reassembly time exceeded

2017-10-12 Thread Matteo Croce
e current behaviour. In both cases increment the related error count "icmpInTimeExcds". While at it, fix a typo in a comment, and convert the if statement into a switch to mate it more readable. Signed-off-by: Matteo Croce <mcr...@redhat.com> --- net/ipv4/icmp.c | 15

[PATCH] udp: make some messages more descriptive

2017-10-17 Thread Matteo Croce
In the UDP code there are two leftover error messages with very few meaning. Replace them with a more descriptive error message as some users reported them as "strange network error". --- net/ipv4/udp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/udp.c

[PATCH v2] udp: make some messages more descriptive

2017-10-19 Thread Matteo Croce
In the UDP code there are two leftover error messages with very few meaning. Replace them with a more descriptive error message as some users reported them as "strange network error". Signed-off-by: Matteo Croce <mcr...@redhat.com> --- v2: added proper signed off tag net/ipv4/u

Re: [PATCH net] ipv6: set all.accept_dad to 0 by default

2017-11-13 Thread Matteo Croce
is not backward compatible. When a user updates its kernel, the dad >> may be enabled by error. >> >> Let's set all.accept_dad to 0 by default to restore the previous behavior. >> >> Fixes: a2d3f3e33853 ("ipv6: fix net.ipv6.conf.all.accept_dad behaviour for >>

[PATCH] bpfilter: fix build error

2018-06-19 Thread Matteo Croce
bpfilter Makefile assumes that the system locale is en_US, and the parsing of objdump output fails. Set LC_ALL=C and, while at it, rewrite the objdump parsing so it spawns only 2 processes instead of 7. Fixes: d2ba09c17a064 ("net: add skeleton of bpfilter kernel module") Signed-off-

[PATCH] bpfilter: ignore binary files

2018-06-19 Thread Matteo Croce
net/bpfilter/bpfilter_umh is a binary file generated when bpfilter is enabled, add it to .gitignore to avoid committing it. Fixes: d2ba09c17a064 ("net: add skeleton of bpfilter kernel module") Signed-off-by: Matteo Croce --- net/bpfilter/.gitignore | 1 + 1 file changed, 1 insertion(

[PATCH] ppp: allow usage in namespaces

2017-10-27 Thread Matteo Croce
Check for CAP_NET_ADMIN with ns_capable() instead of capable() to allow usage of ppp in user namespace other than the init one. Signed-off-by: Matteo Croce <mcr...@redhat.com> --- drivers/net/ppp/ppp_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/n

[PATCH 3/3] ipvlan: selects master_l3 device instead of depending on it

2018-02-14 Thread Matteo Croce
The L3 Master device is just a glue between the core networking code and device drivers, so it should be selected automatically rather than requiring to be enabled explicitly. Signed-off-by: Matteo Croce <mcr...@redhat.com> --- drivers/net/Kconfig | 2 +- 1 file changed, 1 insertion

[PATCH 2/3] ipvlan: drop netfilter dependency

2018-02-14 Thread Matteo Croce
IPVlan has an hard dependency on netfilter. Refactor the ipvlan code to allow compiling it with netfilter disabled. Signed-off-by: Matteo Croce <mcr...@redhat.com> --- drivers/net/Kconfig | 1 - drivers/net/ipvlan/ipvlan.h | 2 ++ drivers/net/ipvlan/ipvlan_core.

[PATCH 0/3] Remove IPVlan module dependencies on IPv6 and Netfilter

2018-02-14 Thread Matteo Croce
# CONFIG_NETFILTER is not set CONFIG_IPVLAN=m $ ll drivers/net/ipvlan/ipvlan.ko 43K drivers/net/ipvlan/ipvlan.ko Matteo Croce (3): ipvlan: drop ipv6 dependency ipvlan: drop netfilter dependency ipvlan: selects master_l3 device instead of depending on it drivers/net/Kconfig | 4

[PATCH 1/3] ipvlan: drop ipv6 dependency

2018-02-14 Thread Matteo Croce
IPVlan has an hard dependency on IPv6. Refactor the ipvlan code to allow compiling it with IPv6 disabled. Signed-off-by: Matteo Croce <mcr...@redhat.com> --- drivers/net/Kconfig | 1 - drivers/net/ipvlan/ipvlan_core.c | 71 ++-- drive

Re: [PATCH 0/3] Remove IPVlan module dependencies on IPv6 and Netfilter

2018-02-15 Thread Matteo Croce
On Thu, Feb 15, 2018 at 2:11 AM, David Miller <da...@davemloft.net> wrote: > From: Matteo Croce <mcr...@redhat.com> > Date: Wed, 14 Feb 2018 19:13:42 +0100 > >> The IPVlan module currently depends on IPv6 and Netfilter. >> Refactor the code to allow building IPVl

[PATCH v2 net-next 1/2] ipvlan: drop ipv6 dependency

2018-02-17 Thread Matteo Croce
IPVlan has an hard dependency on IPv6. Refactor the ipvlan code to allow compiling it with IPv6 disabled. Signed-off-by: Matteo Croce <mcr...@redhat.com> --- drivers/net/Kconfig | 1 - drivers/net/ipvlan/ipvlan_core.c | 71 ++-- drive

[PATCH v2 net-next 0/3] Remove IPVlan module dependencies on IPv6 and L3 Master dev

2018-02-17 Thread Matteo Croce
-wE 'CONFIG_(IPV6|IPVLAN)' .config CONFIG_IPV6=y CONFIG_IPVLAN=m $ ll drivers/net/ipvlan/ipvlan.ko 48K drivers/net/ipvlan/ipvlan.ko $ grep -wE 'CONFIG_(IPV6|IPVLAN)' .config # CONFIG_IPV6 is not set CONFIG_IPVLAN=m $ ll drivers/net/ipvlan/ipvlan.ko 44K drivers/net/ipvlan/ipvlan.ko Matteo Croce (2

[PATCH v2 net-next 2/2] ipvlan: selects master_l3 device instead of depending on it

2018-02-17 Thread Matteo Croce
The L3 Master device is just a glue between the core networking code and device drivers, so it should be selected automatically rather than requiring to be enabled explicitly. Signed-off-by: Matteo Croce <mcr...@redhat.com> --- drivers/net/Kconfig | 2 +- 1 file changed, 1 insertion

Re: [PATCH v2 net-next 0/3] Remove IPVlan module dependencies on IPv6 and L3 Master dev

2018-02-17 Thread Matteo Croce
On Sat, Feb 17, 2018 at 8:11 PM, Matteo Croce <mcr...@redhat.com> wrote: > The IPVlan module currently depends on IPv6 and L3 Master dev. > Refactor the code to allow building IPVlan module regardless of the value of > CONFIG_IPV6 and CONFIG_NETFILTER, and change the CONFIG_NE

[PATCH net-next v4 1/2] ipvlan: drop ipv6 dependency

2018-02-20 Thread Matteo Croce
IPVlan has an hard dependency on IPv6, refactor the ipvlan code to allow compiling it with IPv6 disabled, move duplicate code into addr_equal() and refactor series of if-else into a switch. Signed-off-by: Matteo Croce <mcr...@redhat.com> --- v4: more descriptive commit message a

[PATCH net-next v4 0/2] Remove IPVlan module dependencies on IPv6 and L3 Master dev

2018-02-20 Thread Matteo Croce
/ipvlan/ipvlan.ko Matteo Croce (2): ipvlan: drop ipv6 dependency ipvlan: selects master_l3 device instead of depending on it drivers/net/Kconfig | 3 +- drivers/net/ipvlan/ipvlan_core.c | 72 ++-- drivers/net/ipvlan/ipvlan_main.c | 48

[PATCH net-next v4 2/2] ipvlan: selects master_l3 device instead of depending on it

2018-02-20 Thread Matteo Croce
The L3 Master device is just a glue between the core networking code and device drivers, so it should be selected automatically rather than requiring to be enabled explicitly. Signed-off-by: Matteo Croce <mcr...@redhat.com> --- drivers/net/Kconfig | 2 +- 1 file changed, 1 insertion

[PATCH v3 net-next 1/2] ipvlan: drop ipv6 dependency

2018-02-19 Thread Matteo Croce
IPVlan has an hard dependency on IPv6. Refactor the ipvlan code to allow compiling it with IPv6 disabled, move duplicate code into addr_equal() and refactor series of if-else into a switch. Signed-off-by: Matteo Croce <mcr...@redhat.com> --- v3: more descriptive commit message a

[PATCH] bpfilter: fix user mode helper cross compilation

2018-06-20 Thread Matteo Croce
Use $(OBJDUMP) instead of literal 'objdump' to avoid using host toolchain when cross compiling. Fixes: 421780fd4983 ("bpfilter: fix build error") Signed-off-by: Matteo Croce --- net/bpfilter/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bpfilter/Make

Re: [PATCH] bpfilter: fix build error

2018-06-20 Thread Matteo Croce
On Wed, Jun 20, 2018 at 12:39 PM Stefano Brivio wrote: > > On Tue, 19 Jun 2018 17:16:20 +0200 > Matteo Croce wrote: > > > bpfilter Makefile assumes that the system locale is en_US, and the > > parsing of objdump output fails. > > Set LC_ALL=C and, while at it,

[PATCH iproute2] ip link: don't stop batch processing

2018-08-03 Thread Matteo Croce
When 'ip link show dev DEVICE' is processed in a batch mode, ip exits and stop processing further commands. This because ipaddr_list_flush_or_save() calls exit() to avoid printing the link information twice. Replace the exit with a classic goto out instruction. Signed-off-by: Matteo Croce

Re: [PATCH RFC net-next] openvswitch: Queue upcalls to userspace in per-port round-robin order

2018-07-31 Thread Matteo Croce
On Mon, Jul 16, 2018 at 4:54 PM Matteo Croce wrote: > > On Tue, Jul 10, 2018 at 6:31 PM Pravin Shelar wrote: > > > > On Wed, Jul 4, 2018 at 7:23 AM, Matteo Croce wrote: > > > From: Stefano Brivio > > > > > > Open vSwitch sends to userspace all r

Re: [PATCH RFC net-next] openvswitch: Queue upcalls to userspace in per-port round-robin order

2018-07-16 Thread Matteo Croce
On Tue, Jul 10, 2018 at 6:31 PM Pravin Shelar wrote: > > On Wed, Jul 4, 2018 at 7:23 AM, Matteo Croce wrote: > > From: Stefano Brivio > > > > Open vSwitch sends to userspace all received packets that have > > no associated flow (thus doing an "upcall")

[PATCH RFC net-next] openvswitch: Queue upcalls to userspace in per-port round-robin order

2018-07-04 Thread Matteo Croce
ation (i.e. upcalls rate) otherwise. This ensures fairness among ports under load and with few netlink sockets. Signed-off-by: Matteo Croce Co-authored-by: Stefano Brivio --- net/openvswitch/datapath.c | 143 ++--- net/openvswitch/datapath.h | 27 ++- 2 fil

Re: [PATCH] [net-next] ipvlan: fix building with modular IPV6

2018-02-26 Thread Matteo Croce
6 || !IPV6 > depends on NETFILTER > select NET_L3_MASTER_DEV > ---help--- > -- > 2.9.0 > Sorry for that, the fix look very reasonable to me. Thanks, -- Matteo Croce per aspera ad upstream

Re: [PATCH] bpfilter: fix user mode helper cross compilation

2018-06-28 Thread Matteo Croce
On Thu, Jun 28, 2018 at 6:17 AM Andrew Morton wrote: > > On Wed, 20 Jun 2018 16:04:34 +0200 Matteo Croce wrote: > > > Use $(OBJDUMP) instead of literal 'objdump' to avoid > > using host toolchain when cross compiling. > > > > I'm still having issues here, with

[PATCH bpf-next 0/2] sample: xdp1 improvements

2018-10-18 Thread Matteo Croce
Small improvements to improve the readability and easiness to use of the xdp1 sample. Matteo Croce (2): samples: bpf: improve xdp1 example samples: bpf: get ifindex from ifname samples/bpf/xdp1_user.c | 44 ++--- 1 file changed, 32 insertions(+), 12

[PATCH bpf-next 2/2] samples: bpf: get ifindex from ifname

2018-10-18 Thread Matteo Croce
Find the ifindex via ioctl(SIOCGIFINDEX) instead of requiring the numeric ifindex. Signed-off-by: Matteo Croce --- samples/bpf/xdp1_user.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/samples/bpf/xdp1_user.c b/samples/bpf/xdp1_user.c index

[PATCH bpf-next 1/2] samples: bpf: improve xdp1 example

2018-10-18 Thread Matteo Croce
Store only the total packet count for every protocol, instead of the whole per-cpu array. Use bpf_map_get_next_key() to iterate the map, instead of looking up all the protocols. Signed-off-by: Matteo Croce --- samples/bpf/xdp1_user.c | 18 -- 1 file changed, 8 insertions(+), 10

Re: [PATCH bpf-next 2/2] samples: bpf: get ifindex from ifname

2018-10-19 Thread Matteo Croce
On Fri, Oct 19, 2018 at 5:35 AM Y Song wrote: > > On Thu, Oct 18, 2018 at 1:48 PM Matteo Croce wrote: > > > > Find the ifindex via ioctl(SIOCGIFINDEX) instead of requiring the > > numeric ifindex. > > Maybe use if_nametoindex which is simpler? > &g

[PATCH net] macvlan: return correct error value

2018-11-30 Thread Matteo Croce
A MAC address must be unique among all the macvlan devices with the same lower device. The only exception is the passthru [sic] mode, which shares the lower device address. When duplicate addresses are detected, EBUSY is returned when bringing the interface up: # ip link add macvlan0 link

[PATCH bpf-next v2 2/2] samples: bpf: get ifindex from ifname

2018-11-30 Thread Matteo Croce
Find the ifindex with if_nametoindex() instead of requiring the numeric ifindex. Signed-off-by: Matteo Croce --- v2: use if_nametoindex() instead of ioctl() samples/bpf/xdp1_user.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/samples/bpf/xdp1_user.c b/samples

[PATCH bpf-next v2 0/2] sample: xdp1 improvements

2018-11-30 Thread Matteo Croce
Small improvements to improve the readability and easiness to use of the xdp1 sample. Matteo Croce (2): samples: bpf: improve xdp1 example samples: bpf: get ifindex from ifname samples/bpf/xdp1_user.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions

[PATCH bpf-next v2 1/2] samples: bpf: improve xdp1 example

2018-11-30 Thread Matteo Croce
Store only the total packet count for every protocol, instead of the whole per-cpu array. Use bpf_map_get_next_key() to iterate the map, instead of looking up all the protocols. Signed-off-by: Matteo Croce --- samples/bpf/xdp1_user.c | 18 -- 1 file changed, 8 insertions(+), 10

Re: [PATCH bpf-next v2 0/2] sample: xdp1 improvements

2018-12-01 Thread Matteo Croce
On Sat, Dec 1, 2018 at 6:11 AM Alexei Starovoitov wrote: > > On Sat, Dec 01, 2018 at 01:23:04AM +0100, Matteo Croce wrote: > > Small improvements to improve the readability and easiness > > to use of the xdp1 sample. > > Applied to bpf-next. > > I think that sa

[PATCH net] macvlan: remove duplicate check

2018-12-04 Thread Matteo Croce
nc_address() before any other check. Signed-off-by: Matteo Croce --- drivers/net/macvlan.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 0da3d36b283b..f3361aabdb78 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net

Re: [PATCH net] macvlan: remove duplicate check

2018-12-06 Thread Matteo Croce
On Wed, Dec 5, 2018 at 8:40 PM David Miller wrote: > > From: Matteo Croce > Date: Tue, 4 Dec 2018 18:05:42 +0100 > > > Following commit 59f997b088d2 ("macvlan: return correct error value"), > > there is a duplicate check for mac addr