* Re: [PATCH net-next 0/3] dpaa2-eth: Add new statistics counters
From: Jakub Kicinski @ 2019-08-31 6:12 UTC (permalink / raw)
To: Ioana Radulescu; +Cc: netdev, davem, ioana.ciornei
In-Reply-To: <1567160443-31297-1-git-send-email-ruxandra.radulescu@nxp.com>
On Fri, 30 Aug 2019 13:20:40 +0300, Ioana Radulescu wrote:
> Recent firmware versions offer access to more DPNI statistics
> counters. Add the relevant ones to ethtool interface stats.
>
> Also we can now make use of a new counter for in flight egress frames
> to avoid sleeping an arbitrary amount of time in the ndo_stop routine.
A little messy there in the comment of patch 2, and IMHO if you're
expecting particular errors to be ignored it's better to write:
if (err == -EOPNOTSUPP)
/* still fine*/;
else if (err)
/* real err */
than assume any error is for unsupported and add a extra comment
explaining that things may be not supported.
Series LGTM tho.
^ permalink raw reply
* Re: [PATCH net-next 0/4] qed*: Enhancements.
From: Jakub Kicinski @ 2019-08-31 5:10 UTC (permalink / raw)
To: Sudarsana Reddy Kalluru; +Cc: davem, netdev, mkalderon, aelior
In-Reply-To: <20190830074206.8836-1-skalluru@marvell.com>
On Fri, 30 Aug 2019 00:42:02 -0700, Sudarsana Reddy Kalluru wrote:
> The patch series adds couple of enhancements to qed/qede drivers.
> - Support for dumping the config id attributes via ethtool -w/W.
> - Support for dumping the GRC data of required memory regions using
> ethtool -w/W interfaces.
>
> Patch (1) adds driver APIs for reading the config id attributes.
> Patch (2) adds ethtool support for dumping the config id attributes.
> Patch (3) adds support for configuring the GRC dump config flags.
> Patch (4) adds ethtool support for dumping the grc dump.
I don't see anything too objectionable here, but without knowing what
GRC stands for etc. examples of what's actually exchanged here, it's
a little hard to judge..
^ permalink raw reply
* Re: [PATCH v4 2/2] net: br_netfiler_hooks: Drops IPv6 packets if IPv6 module is not loaded
From: Leonardo Bras @ 2019-08-31 4:42 UTC (permalink / raw)
To: Florian Westphal
Cc: netfilter-devel, coreteam, bridge, netdev, linux-kernel,
Pablo Neira Ayuso, Jozsef Kadlecsik, Roopa Prabhu,
Nikolay Aleksandrov, David S. Miller
In-Reply-To: <20190830205541.GR20113@breakpoint.cc>
[-- Attachment #1: Type: text/plain, Size: 1904 bytes --]
On Fri, 2019-08-30 at 22:55 +0200, Florian Westphal wrote:
> Leonardo Bras <leonardo@linux.ibm.com> wrote:
> > A kernel panic can happen if a host has disabled IPv6 on boot and have to
> > process guest packets (coming from a bridge) using it's ip6tables.
> >
> > IPv6 packets need to be dropped if the IPv6 module is not loaded.
> >
> > Signed-off-by: Leonardo Bras <leonardo@linux.ibm.com>
> > ---
> > net/bridge/br_netfilter_hooks.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/net/bridge/br_netfilter_hooks.c b/net/bridge/br_netfilter_hooks.c
> > index d3f9592f4ff8..5e8693730df1 100644
> > --- a/net/bridge/br_netfilter_hooks.c
> > +++ b/net/bridge/br_netfilter_hooks.c
> > @@ -493,6 +493,8 @@ static unsigned int br_nf_pre_routing(void *priv,
> > brnet = net_generic(state->net, brnf_net_id);
> > if (IS_IPV6(skb) || is_vlan_ipv6(skb, state->net) ||
> > is_pppoe_ipv6(skb, state->net)) {
> > + if (!ipv6_mod_enabled())
> > + return NF_DROP;
> > if (!brnet->call_ip6tables &&
> > !br_opt_get(br, BROPT_NF_CALL_IP6TABLES))
> > return NF_ACCEPT;
>
> No, thats too aggressive and turns the bridge into an ipv6 blackhole.
>
> There are two solutions:
> 1. The above patch, but use NF_ACCEPT instead
> 2. keep the DROP, but move it below the call_ip6tables test,
> so that users can tweak call-ip6tables to accept packets.
Q: Does 2 mean that it will only be dropped if bridge intents to use
host's ip6tables? Else, it will be accepted by previous if?
> Perhaps it would be good to also add a pr_warn_once() that
> tells that ipv6 was disabled on command line and
> call-ip6tables isn't supported in this configuration.
>
Good idea, added.
> I would go with option two.
I think it's better than 1 too.
I sent a v5 with these changes:
https://lkml.org/lkml/2019/8/31/4
Thanks!
Leonardo Bras
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply
* [PATCH v5 1/1] net: br_netfiler_hooks: Drops IPv6 packets if IPv6 module is not loaded
From: Leonardo Bras @ 2019-08-31 4:40 UTC (permalink / raw)
To: netfilter-devel, coreteam, bridge, netdev, linux-kernel
Cc: Leonardo Bras, Pablo Neira Ayuso, Jozsef Kadlecsik,
Florian Westphal, Roopa Prabhu, Nikolay Aleksandrov,
David S. Miller
A kernel panic can happen if a host has disabled IPv6 on boot and have to
process guest packets (coming from a bridge) using it's ip6tables.
IPv6 packets need to be dropped if the IPv6 module is not loaded, and the
host ip6tables will be used.
Signed-off-by: Leonardo Bras <leonardo@linux.ibm.com>
---
Changes from v4:
- Check if the host ip6tables is going to be used before testing
ipv6 module presence
- Adds a warning about ipv6 module disabled.
net/bridge/br_netfilter_hooks.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/bridge/br_netfilter_hooks.c b/net/bridge/br_netfilter_hooks.c
index d3f9592f4ff8..af7800103e51 100644
--- a/net/bridge/br_netfilter_hooks.c
+++ b/net/bridge/br_netfilter_hooks.c
@@ -496,6 +496,10 @@ static unsigned int br_nf_pre_routing(void *priv,
if (!brnet->call_ip6tables &&
!br_opt_get(br, BROPT_NF_CALL_IP6TABLES))
return NF_ACCEPT;
+ if (!ipv6_mod_enabled()) {
+ pr_warn_once("Module ipv6 is disabled, so call_ip6tables is not supported.");
+ return NF_DROP;
+ }
nf_bridge_pull_encap_header_rcsum(skb);
return br_nf_pre_routing_ipv6(priv, skb, state);
--
2.20.1
^ permalink raw reply related
* Re: [PATCH 1/1] forcedeth: use per cpu to collect xmit/recv statistics
From: Zhu Yanjun @ 2019-08-31 4:24 UTC (permalink / raw)
To: Eric Dumazet, netdev, davem, nan.1986san
In-Reply-To: <24ad8394-cb24-fcb7-0dc2-3435429bb8cd@gmail.com>
On 2019/8/30 17:32, Eric Dumazet wrote:
>
> On 8/30/19 10:35 AM, Zhu Yanjun wrote:
>> When testing with a background iperf pushing 1Gbit/sec traffic and running
>> both ifconfig and netstat to collect statistics, some deadlocks occurred.
>>
> This is quite a heavy patch trying to fix a bug...
This is to use per-cpu variable. Perhaps the changes are big.
>
> I suspect the root cause has nothing to do with stat
> collection since on 64bit arches there is no additional synchronization.
This bug is similar to the one that the commit 5f6b4e14cada ("net: dsa:
User per-cpu 64-bit statistics") tries to fix.
So a similar patch is to fix this similar bug in forcedeth.
> (u64_stats_update_begin(), u64_stats_update_end() are nops)
Sure. Exactly.
>
>> +static inline void nv_get_stats(int cpu, struct fe_priv *np,
>> + struct rtnl_link_stats64 *storage)
>> +{
>> + struct nv_txrx_stats *src = per_cpu_ptr(np->txrx_stats, cpu);
>> + unsigned int syncp_start;
>> +
>> + do {
>> + syncp_start = u64_stats_fetch_begin_irq(&np->swstats_rx_syncp);
>> + storage->rx_packets += src->stat_rx_packets;
>> + storage->rx_bytes += src->stat_rx_bytes;
>> + storage->rx_dropped += src->stat_rx_dropped;
>> + storage->rx_missed_errors += src->stat_rx_missed_errors;
>> + } while (u64_stats_fetch_retry_irq(&np->swstats_rx_syncp, syncp_start));
>> +
>> + do {
>> + syncp_start = u64_stats_fetch_begin_irq(&np->swstats_tx_syncp);
>> + storage->tx_packets += src->stat_tx_packets;
>> + storage->tx_bytes += src->stat_tx_bytes;
>> + storage->tx_dropped += src->stat_tx_dropped;
>> + } while (u64_stats_fetch_retry_irq(&np->swstats_tx_syncp, syncp_start));
>> +}
>> +
>>
> This is buggy :
> If the loops are ever restarted, the storage->fields will have
> been modified multiple times.
Sure. Sorry. My bad.
A similar changes in the commit 5f6b4e14cada ("net: dsa: User per-cpu
64-bit statistics").
I will use this similar changes.
I will send V2 soon.
Thanks a lot for your comments.
Zhu Yanjun
>
>
^ permalink raw reply
* Re: [PATCH v3 03/11] net/mlx5e: Remove unlikely() from WARN*() condition
From: David Miller @ 2019-08-31 2:50 UTC (permalink / raw)
To: saeedm; +Cc: efremov, linux-kernel, joe, borisp, netdev, leon, akpm
In-Reply-To: <ad2ef15ddaec0033ce17d8ba252037ef70c7ac93.camel@mellanox.com>
From: Saeed Mahameed <saeedm@mellanox.com>
Date: Thu, 29 Aug 2019 21:23:30 +0000
> On Thu, 2019-08-29 at 19:50 +0300, Denis Efremov wrote:
>> "unlikely(WARN_ON_ONCE(x))" is excessive. WARN_ON_ONCE() already uses
>> unlikely() internally.
>>
>> Signed-off-by: Denis Efremov <efremov@linux.com>
>> Cc: Boris Pismenny <borisp@mellanox.com>
>> Cc: Saeed Mahameed <saeedm@mellanox.com>
>> Cc: Leon Romanovsky <leon@kernel.org>
>> Cc: Joe Perches <joe@perches.com>
>> Cc: Andrew Morton <akpm@linux-foundation.org>
>> Cc: netdev@vger.kernel.org
>> ---
>> drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git
>> a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c
>> b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c
>> index 7833ddef0427..e5222d17df35 100644
>> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c
>> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c
>> @@ -408,7 +408,7 @@ struct sk_buff *mlx5e_ktls_handle_tx_skb(struct
>> net_device *netdev,
>> goto out;
>>
>> tls_ctx = tls_get_ctx(skb->sk);
>> - if (unlikely(WARN_ON_ONCE(tls_ctx->netdev != netdev)))
>> + if (WARN_ON_ONCE(tls_ctx->netdev != netdev))
>> goto err_out;
>>
>> priv_tx = mlx5e_get_ktls_tx_priv_ctx(tls_ctx);
>
> Acked-by: Saeed Mahameed <saeedm@mellanox.com>
>
> Dave, you can take this one.
Ok, applied to net-next as well as the UDP patch.
^ permalink raw reply
* [PATCH bpf-next 2/2] selftests/bpf: test_progs: add missing \n to CHECK_FAIL
From: Stanislav Fomichev @ 2019-08-31 2:34 UTC (permalink / raw)
To: netdev, bpf; +Cc: davem, ast, daniel, Stanislav Fomichev
In-Reply-To: <20190831023427.239820-1-sdf@google.com>
Copy-paste error from CHECK.
Fixes: d38835b75f67 ("selftests/bpf: test_progs: remove global fail/success counts")
Signed-off-by: Stanislav Fomichev <sdf@google.com>
---
tools/testing/selftests/bpf/test_progs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/test_progs.h b/tools/testing/selftests/bpf/test_progs.h
index 33da849cb765..c8edb9464ba6 100644
--- a/tools/testing/selftests/bpf/test_progs.h
+++ b/tools/testing/selftests/bpf/test_progs.h
@@ -107,7 +107,7 @@ extern struct ipv6_packet pkt_v6;
int __ret = !!(condition); \
if (__ret) { \
test__fail(); \
- printf("%s:FAIL:%d ", __func__, __LINE__); \
+ printf("%s:FAIL:%d\n", __func__, __LINE__); \
} \
__ret; \
})
--
2.23.0.187.g17f5b7556c-goog
^ permalink raw reply related
* [PATCH bpf-next 1/2] selftests/bpf: test_progs: fix verbose mode garbage
From: Stanislav Fomichev @ 2019-08-31 2:34 UTC (permalink / raw)
To: netdev, bpf; +Cc: davem, ast, daniel, Stanislav Fomichev
fseeko(.., 0, SEEK_SET) on a memstream just puts the buffer pointer
to the beginning so when we call fflush on it we get some garbage
log data from the previous test. Let's manually set terminating
byte to zero at the reported buffer size.
To show the issue consider the following snippet:
stream = open_memstream (&buf, &len);
fprintf(stream, "aaa");
fflush(stream);
printf("buf=%s, len=%zu\n", buf, len);
fseeko(stream, 0, SEEK_SET);
fprintf(stream, "b");
fflush(stream);
printf("buf=%s, len=%zu\n", buf, len);
Output:
buf=aaa, len=3
buf=baa, len=1
Fixes: 946152b3c5d6 ("selftests/bpf: test_progs: switch to open_memstream")
Signed-off-by: Stanislav Fomichev <sdf@google.com>
---
tools/testing/selftests/bpf/test_progs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c
index e5892cb60eca..e8616e778cb5 100644
--- a/tools/testing/selftests/bpf/test_progs.c
+++ b/tools/testing/selftests/bpf/test_progs.c
@@ -45,6 +45,7 @@ static void dump_test_log(const struct prog_test_def *test, bool failed)
if (env.verbose || test->force_log || failed) {
if (env.log_cnt) {
+ env.log_buf[env.log_cnt] = '\0';
fprintf(env.stdout, "%s", env.log_buf);
if (env.log_buf[env.log_cnt - 1] != '\n')
fprintf(env.stdout, "\n");
--
2.23.0.187.g17f5b7556c-goog
^ permalink raw reply related
* Re: [PATCH 4.14] tcp: fix tcp_rtx_queue_tail in case of empty retransmit queue
From: David Miller @ 2019-08-31 2:20 UTC (permalink / raw)
To: cpaasch
Cc: jonathan.lemon, stable, gregkh, tim.froidcoeur, matthieu.baerts,
aprout, edumazet, jtl, linux-kernel, mkubecek, ncardwell, sashal,
ycheng, netdev
In-Reply-To: <20190830232657.GL45416@MacBook-Pro-64.local>
From: Christoph Paasch <cpaasch@apple.com>
Date: Fri, 30 Aug 2019 16:26:57 -0700
> (I don't see it in the stable-queue)
I don't handle any stable branch before the most recent two, so this isn't
my territory.
^ permalink raw reply
* [PATCH] net: stmmac: dwmac-sun8i: Variable "val" in function sun8i_dwmac_set_syscon() could be uninitialized
From: Yizhuo @ 2019-08-31 2:00 UTC (permalink / raw)
Cc: csong, zhiyunq, Yizhuo, Giuseppe Cavallaro, Alexandre Torgue,
Jose Abreu, David S. Miller, Maxime Ripard, Chen-Yu Tsai,
Maxime Coquelin, netdev, linux-arm-kernel, linux-stm32,
linux-kernel
In function sun8i_dwmac_set_syscon(), local variable "val" could
be uninitialized if function regmap_field_read() returns -EINVAL.
However, it will be used directly in the if statement, which
is potentially unsafe.
Signed-off-by: Yizhuo <yzhai003@ucr.edu>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index 4083019c547a..f97a4096f8fc 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -873,7 +873,12 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv)
int ret;
u32 reg, val;
- regmap_field_read(gmac->regmap_field, &val);
+ ret = regmap_field_read(gmac->regmap_field, &val);
+ if (ret) {
+ dev_err(priv->device, "Fail to read from regmap field.\n");
+ return ret;
+ }
+
reg = gmac->variant->default_syscon_value;
if (reg != val)
dev_warn(priv->device,
--
2.17.1
^ permalink raw reply related
* Re: [PATCH 4.14] tcp: fix tcp_rtx_queue_tail in case of empty retransmit queue
From: Christoph Paasch @ 2019-08-30 23:26 UTC (permalink / raw)
To: Jonathan Lemon, stable, gregkh
Cc: Tim Froidcoeur, matthieu.baerts, aprout, davem, edumazet, jtl,
linux-kernel, mkubecek, ncardwell, sashal, ycheng, netdev
In-Reply-To: <400C4757-E7AD-4CCF-8077-79563EA869B1@gmail.com>
Hello,
On 24/08/19 - 15:05:20, Jonathan Lemon wrote:
>
>
> On 23 Aug 2019, at 23:03, Tim Froidcoeur wrote:
>
> > Commit 8c3088f895a0 ("tcp: be more careful in tcp_fragment()")
> > triggers following stack trace:
> >
> > [25244.848046] kernel BUG at ./include/linux/skbuff.h:1406!
> > [25244.859335] RIP: 0010:skb_queue_prev+0x9/0xc
> > [25244.888167] Call Trace:
> > [25244.889182] <IRQ>
> > [25244.890001] tcp_fragment+0x9c/0x2cf
> > [25244.891295] tcp_write_xmit+0x68f/0x988
> > [25244.892732] __tcp_push_pending_frames+0x3b/0xa0
> > [25244.894347] tcp_data_snd_check+0x2a/0xc8
> > [25244.895775] tcp_rcv_established+0x2a8/0x30d
> > [25244.897282] tcp_v4_do_rcv+0xb2/0x158
> > [25244.898666] tcp_v4_rcv+0x692/0x956
> > [25244.899959] ip_local_deliver_finish+0xeb/0x169
> > [25244.901547] __netif_receive_skb_core+0x51c/0x582
> > [25244.903193] ? inet_gro_receive+0x239/0x247
> > [25244.904756] netif_receive_skb_internal+0xab/0xc6
> > [25244.906395] napi_gro_receive+0x8a/0xc0
> > [25244.907760] receive_buf+0x9a1/0x9cd
> > [25244.909160] ? load_balance+0x17a/0x7b7
> > [25244.910536] ? vring_unmap_one+0x18/0x61
> > [25244.911932] ? detach_buf+0x60/0xfa
> > [25244.913234] virtnet_poll+0x128/0x1e1
> > [25244.914607] net_rx_action+0x12a/0x2b1
> > [25244.915953] __do_softirq+0x11c/0x26b
> > [25244.917269] ? handle_irq_event+0x44/0x56
> > [25244.918695] irq_exit+0x61/0xa0
> > [25244.919947] do_IRQ+0x9d/0xbb
> > [25244.921065] common_interrupt+0x85/0x85
> > [25244.922479] </IRQ>
> >
> > tcp_rtx_queue_tail() (called by tcp_fragment()) can call
> > tcp_write_queue_prev() on the first packet in the queue, which will trigger
> > the BUG in tcp_write_queue_prev(), because there is no previous packet.
> >
> > This happens when the retransmit queue is empty, for example in case of a
> > zero window.
> >
> > Patch is needed for 4.4, 4.9 and 4.14 stable branches.
> >
> > Fixes: 8c3088f895a0 ("tcp: be more careful in tcp_fragment()")
> > Change-Id: I839bde7167ae59e2f7d916c913507372445765c5
> > Signed-off-by: Tim Froidcoeur <tim.froidcoeur@tessares.net>
> > Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
> > Reviewed-by: Christoph Paasch <cpaasch@apple.com>
>
> Acked-by: Jonathan Lemon <jonathan.lemon@gmail.com>
just checking in, if the patch is getting picked up for -stable ?
(I don't see it in the stable-queue)
Thanks,
Christoph
^ permalink raw reply
* Re: [PATCH net] net: Properly update v4 routes with v6 nexthop
From: David Ahern @ 2019-08-31 1:48 UTC (permalink / raw)
To: Donald Sharp, netdev, dsahern, sworley
In-Reply-To: <20190830181446.25262-1-sharpd@cumulusnetworks.com>
On 8/30/19 12:14 PM, Donald Sharp wrote:
> diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
> index 4c81846ccce8..c7e94edae482 100644
> --- a/include/net/ip_fib.h
> +++ b/include/net/ip_fib.h
> @@ -513,7 +513,7 @@ int ip_valid_fib_dump_req(struct net *net, const struct nlmsghdr *nlh,
> struct netlink_callback *cb);
>
> int fib_nexthop_info(struct sk_buff *skb, const struct fib_nh_common *nh,
> - unsigned char *flags, bool skip_oif);
> + u8 family, unsigned char *flags, bool skip_oif);
> int fib_add_nexthop(struct sk_buff *skb, const struct fib_nh_common *nh,
> - int nh_weight);
> + int nh_weight, u8 family);
Call this rt_family in both for 'route family' to make it clear.
> #endif /* _NET_FIB_H */
> diff --git a/include/net/nexthop.h b/include/net/nexthop.h
> index 95f766c31c90..f13c61806abf 100644
> --- a/include/net/nexthop.h
> +++ b/include/net/nexthop.h
> @@ -172,7 +172,7 @@ int nexthop_mpath_fill_node(struct sk_buff *skb, struct nexthop *nh)
nexthop_mpath_fill_node should take the family as input argument and
then ...
> struct fib_nh_common *nhc = &nhi->fib_nhc;
> int weight = nhg->nh_entries[i].weight;
>
> - if (fib_add_nexthop(skb, nhc, weight) < 0)
> + if (fib_add_nexthop(skb, nhc, weight, nhc->nhc_family) < 0)
pass it to fib_add_nexthop.
> return -EMSGSIZE;
> }
>
The rest looks ok to me.
as an FYI for the archives, the fib_nexthops.sh script does show the
unexpected gw for IPv6 but it does not flag it as an error. I need to
fix that so this should have been caught in the original submission.
^ permalink raw reply
* Re: Proposal: r8152 firmware patching framework
From: Amber Chen @ 2019-08-31 0:53 UTC (permalink / raw)
To: Prashant Malani
Cc: Hayes Wang, David Miller, netdev@vger.kernel.org, Bambi Yeh,
Ryankao, Jackc, Albertk, marcochen@google.com, nic_swsd,
Grant Grundler
In-Reply-To: <CACeCKacjCkS5UmzS9irm0JjGmk98uBBBsTLSzrXoDUJ60Be9Vw@mail.gmail.com>
+ acct mgr, Stephen
> Prashant Malani <pmalani@chromium.org> 於 2019年8月31日 上午6:24 寫道:
>
> (Adding a few more Realtek folks)
>
> Friendly ping. Any thoughts / feedback, Realtek folks (and others) ?
>
>> On Thu, Aug 29, 2019 at 11:40 AM Prashant Malani <pmalani@chromium.org> wrote:
>>
>> Hi,
>>
>> The r8152 driver source code distributed by Realtek (on
>> www.realtek.com) contains firmware patches. This involves binary
>> byte-arrays being written byte/word-wise to the hardware memory
>> Example: grundler@chromium.org (cc-ed) has an experimental patch which
>> includes the firmware patching code which was distributed with the
>> Realtek source :
>> https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1417953
>>
>> It would be nice to have a way to incorporate these firmware fixes
>> into the upstream code. Since having indecipherable byte-arrays is not
>> possible upstream, I propose the following:
>> - We use the assistance of Realtek to come up with a format which the
>> firmware patch files can follow (this can be documented in the
>> comments).
>> - A real simple format could look like this:
>> +
>> <section1><size_in_bytes><address1><data1><address2><data2>...<addressN><dataN><section2>...
>> + The driver would be able to understand how to parse
>> each section (e.g is each data entry a byte or a word?)
>>
>> - We use request_firmware() to load the firmware, parse it and write
>> the data to the relevant registers.
>>
>> I'm unfamiliar with what the preferred method of firmware patching is,
>> so I hope the maintainers can help suggest the best path forward.
>>
>> As an aside: It would be great if Realtek could publish a list of
>> fixes that the firmware patches implement (I think a list on the
>> driver download page on the Realtek website would be an excellent
>> starting point).
>>
>> Thanks and Best regards,
>>
>> -Prashant
>
> ------Please consider the environment before printing this e-mail.
^ permalink raw reply
* Re: [PATCH 0/5] Netfilter fixes for net
From: David Miller @ 2019-08-31 0:52 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel, netdev
In-Reply-To: <20190830120704.6147-1-pablo@netfilter.org>
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Fri, 30 Aug 2019 14:06:59 +0200
> The following patchset contains Netfilter fixes for net:
>
> 1) Spurious warning when loading rules using the physdev match,
> from Todd Seidelmann.
>
> 2) Fix FTP conntrack helper debugging output, from Thomas Jarosch.
>
> 3) Restore per-netns nf_conntrack_{acct,helper,timeout} sysctl knobs,
> from Florian Westphal.
>
> 4) Clear skbuff timestamp from the flowtable datapath, also from Florian.
>
> 5) Fix incorrect byteorder of NFT_META_BRI_IIFVPROTO, from wenxu.
Pulled, thanks.
^ permalink raw reply
* Re: pull-request: bpf 2019-08-31
From: David Miller @ 2019-08-31 0:39 UTC (permalink / raw)
To: daniel; +Cc: ast, netdev, bpf
In-Reply-To: <20190830234006.31988-1-daniel@iogearbox.net>
From: Daniel Borkmann <daniel@iogearbox.net>
Date: Sat, 31 Aug 2019 01:40:06 +0200
> The following pull-request contains BPF updates for your *net* tree.
>
> The main changes are:
>
> 1) Fix 32-bit zero-extension during constant blinding which
> has been causing a regression on ppc64, from Naveen.
>
> 2) Fix a latency bug in nfp driver when updating stack index
> register, from Jiong.
Pulled, thanks.
^ permalink raw reply
* Re: [PATCH net-next] bnxt_en: Fix compile error regression with CONFIG_BNXT_SRIOV not set.
From: David Miller @ 2019-08-31 0:38 UTC (permalink / raw)
To: michael.chan; +Cc: netdev, ray.jui
In-Reply-To: <1567206638-22674-1-git-send-email-michael.chan@broadcom.com>
From: Michael Chan <michael.chan@broadcom.com>
Date: Fri, 30 Aug 2019 19:10:38 -0400
> Add a new function bnxt_get_registered_vfs() to handle the work
> of getting the number of registered VFs under #ifdef CONFIG_BNXT_SRIOV.
> The main code will call this function and will always work correctly
> whether CONFIG_BNXT_SRIOV is set or not.
>
> Fixes: 230d1f0de754 ("bnxt_en: Handle firmware reset.")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] net: stmmac: Variable "val" in function sun8i_dwmac_set_syscon() could be uninitialized
From: David Miller @ 2019-08-31 0:37 UTC (permalink / raw)
To: yzhai003
Cc: csong, zhiyunq, peppe.cavallaro, alexandre.torgue, maxime.ripard,
wens, netdev, linux-arm-kernel, linux-kernel
In-Reply-To: <CABvMjLRzuUVh7FxVQj2O40Sbr+VygwSG8spMv0fW2RZVvaJ8rQ@mail.gmail.com>
From: Yizhuo Zhai <yzhai003@ucr.edu>
Date: Fri, 30 Aug 2019 15:29:07 -0700
> Thanks for your feedback, this patch should work for v4.14.
You must always submit patches against the current tree.
^ permalink raw reply
* Re: [v2] net_sched: act_police: add 2 new attributes to support police 64bit rate and peakrate
From: David Z. Dai @ 2019-08-31 0:30 UTC (permalink / raw)
To: David Miller; +Cc: xiyou.wangcong, jhs, jiri, netdev, linux-kernel, zdai
In-Reply-To: <20190830.133335.323827182628557013.davem@davemloft.net>
On Fri, 2019-08-30 at 13:33 -0700, David Miller wrote:
> From: "David Z. Dai" <zdai@linux.vnet.ibm.com>
> Date: Fri, 30 Aug 2019 15:03:52 -0500
>
> > I have the impression that last parameter num value should be larger
> > than the attribute num value in 2nd parameter (TC_POLICE_RATE64 in this
> > case).
>
> The argument in question is explicitly the "padding" value.
>
> Please explain in detail where you got the impression that the
> argument has to be larger?
In include/uapi/linux/pkt_sched.h header:
For HTB:
enum {
TCA_HTB_UNSPEC,
TCA_HTB_PARMS,
TCA_HTB_INIT,
TCA_HTB_CTAB,
TCA_HTB_RTAB,
TCA_HTB_DIRECT_QLEN,
TCA_HTB_RATE64, /* <--- */
TCA_HTB_CEIL64, /* <--- */
TCA_HTB_PAD, /* <--- */
__TCA_HTB_MAX,
};
/* TCA_HTB_RATE64,TCA_HTB_CEIL64 are declared *before* TCA_HTB_PAD */
For TBF:
enum {
TCA_TBF_UNSPEC,
TCA_TBF_PARMS,
TCA_TBF_RTAB,
TCA_TBF_PTAB,
TCA_TBF_RATE64, /* <--- */
TCA_TBF_PRATE64, /* <--- */
TCA_TBF_BURST,
TCA_TBF_PBURST,
TCA_TBF_PAD, /* <--- */
__TCA_TBF_MAX,
};
/* TCA_TBF_RATE64, TCA_TBF_PRATE64 are declared *before* TCA_TBF_PAD */
For HTB, in net/sched/sch_htb.c file, htb_dump_class() routine:
if ((cl->rate.rate_bytes_ps >= (1ULL << 32)) &&
nla_put_u64_64bit(skb, TCA_HTB_RATE64,
cl->rate.rate_bytes_ps,
TCA_HTB_PAD))
goto nla_put_failure;
if ((cl->ceil.rate_bytes_ps >= (1ULL << 32)) &&
nla_put_u64_64bit(skb, TCA_HTB_CEIL64,
cl->ceil.rate_bytes_ps,
TCA_HTB_PAD))
goto nla_put_failure;
For TBF, in net/sched/sch_tbf.c file, tbf_dump() routine:
if (q->rate.rate_bytes_ps >= (1ULL << 32) &&
nla_put_u64_64bit(skb, TCA_TBF_RATE64,
q->rate.rate_bytes_ps,
TCA_TBF_PAD))
goto nla_put_failure;
if (tbf_peak_present(q) &&
q->peak.rate_bytes_ps >= (1ULL << 32) &&
nla_put_u64_64bit(skb, TCA_TBF_PRATE64,
q->peak.rate_bytes_ps,
TCA_TBF_PAD))
goto nla_put_failure;
The last parameter used TCA_TBF_PAD, TCA_TBF_PAD are all declared
*after* those attributes.
I am trying to keep it consistent in police part. That's where my
impression is coming from.
Now for suggestion/comment, do you think is it better to add a new PAD
attribute in include/uapi/pkt_cls.h like this:
enum {
TCA_POLICE_UNSPEC,
TCA_POLICE_TBF,
TCA_POLICE_RATE,
TCA_POLICE_PEAKRATE,
TCA_POLICE_AVRATE,
TCA_POLICE_RESULT,
TCA_POLICE_TM,
TCA_POLICE_PAD,
TCA_POLICE_RATE64, /* <--- */
TCA_POLICE_PEAKRATE64, /* <--- */
TCA_POLICE_PAD2, /* <--- new PAD */
__TCA_POLICE_MAX
#define TCA_POLICE_RESULT TCA_POLICE_RESULT
#};
Then use this TCA_POLICE_PAD2 as the last parameter in
nla_put_u64_64bit()?
Thanks!
^ permalink raw reply
* Re: [PATCH v6 net-next 15/19] ionic: Add Tx and Rx handling
From: Shannon Nelson @ 2019-08-30 23:57 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev, davem
In-Reply-To: <20190829161852.1705d770@cakuba.netronome.com>
On 8/29/19 4:18 PM, Jakub Kicinski wrote:
> On Thu, 29 Aug 2019 11:27:16 -0700, Shannon Nelson wrote:
>> +netdev_tx_t ionic_start_xmit(struct sk_buff *skb, struct net_device *netdev)
>> +{
>> + u16 queue_index = skb_get_queue_mapping(skb);
>> + struct ionic_lif *lif = netdev_priv(netdev);
>> + struct ionic_queue *q;
>> + int ndescs;
>> + int err;
>> +
>> + if (unlikely(!test_bit(IONIC_LIF_UP, lif->state))) {
>> + dev_kfree_skb(skb);
>> + return NETDEV_TX_OK;
>> + }
>> +
>> + if (likely(lif_to_txqcq(lif, queue_index)))
>> + q = lif_to_txq(lif, queue_index);
>> + else
>> + q = lif_to_txq(lif, 0);
>> +
>> + ndescs = ionic_tx_descs_needed(q, skb);
>> + if (ndescs < 0)
>> + goto err_out_drop;
>> +
>> + if (!ionic_q_has_space(q, ndescs)) {
> You should stop the queue in advance, whenever you can't ensure that a
> max size frame can be placed on the ring. Requeuing is very expensive
> so modern drivers should try to never return NETDEV_TX_BUSY
Yes, I see how that's been done in nfp - good idea.
>
>> + netif_stop_subqueue(netdev, queue_index);
>> + q->stop++;
>> +
>> + /* Might race with ionic_tx_clean, check again */
>> + smp_rmb();
>> + if (ionic_q_has_space(q, ndescs)) {
>> + netif_wake_subqueue(netdev, queue_index);
>> + q->wake++;
>> + } else {
>> + return NETDEV_TX_BUSY;
>> + }
>> + }
>> +
>> + if (skb_is_gso(skb))
>> + err = ionic_tx_tso(q, skb);
>> + else
>> + err = ionic_tx(q, skb);
>> +
>> + if (err)
>> + goto err_out_drop;
>> +
>> + return NETDEV_TX_OK;
>> +
>> +err_out_drop:
>> + netif_stop_subqueue(netdev, queue_index);
> This stopping of the queue is suspicious, if ionic_tx() fails there's
> no guarantee the queue will ever be woken up, no?
Yes, that does look odd. If there isn't a new descriptor with an skb in
the queue, it won't get cleaned and reenabled in the Tx clean.
sln
>
>> + q->stop++;
>> + q->drop++;
>> + dev_kfree_skb(skb);
>> + return NETDEV_TX_OK;
>> +}
^ permalink raw reply
* Re: [PATCH] net: bcmgenet: use ethtool_op_get_ts_info()
From: Doug Berger @ 2019-08-30 23:52 UTC (permalink / raw)
To: Florian Fainelli, Ryan M. Collins, David S. Miller
Cc: bcm-kernel-feedback-list, netdev, linux-kernel
In-Reply-To: <a7003b3c-4035-5d4f-43e7-a8a76dcea0fb@gmail.com>
On 8/30/19 11:51 AM, Florian Fainelli wrote:
> On 8/30/19 11:49 AM, Ryan M. Collins wrote:
>> This change enables the use of SW timestamping on the Raspberry Pi 4.
>
> Finally the first bcmgenet patch that was tested on the Pi 4!
>
>>
>> bcmgenet's transmit function bcmgenet_xmit() implements software
>> timestamping. However the SOF_TIMESTAMPING_TX_SOFTWARE capability was
>> missing and only SOF_TIMESTAMPING_RX_SOFTWARE was announced. By using
>> ethtool_ops bcmgenet_ethtool_ops() as get_ts_info(), the
>> SOF_TIMESTAMPING_TX_SOFTWARE capability is announced.
>>
>> Similar to commit a8f5cb9e7991 ("smsc95xx: use ethtool_op_get_ts_info()")
>>
>> Signed-off-by: Ryan M. Collins <rmc032@bucknell.edu>
>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
>
Thanks Ryan!
Acked-by: Doug Berger <opendmb@gmail.com>
^ permalink raw reply
* pull-request: bpf 2019-08-31
From: Daniel Borkmann @ 2019-08-30 23:40 UTC (permalink / raw)
To: davem; +Cc: daniel, ast, netdev, bpf
Hi David,
The following pull-request contains BPF updates for your *net* tree.
The main changes are:
1) Fix 32-bit zero-extension during constant blinding which
has been causing a regression on ppc64, from Naveen.
2) Fix a latency bug in nfp driver when updating stack index
register, from Jiong.
Please consider pulling these changes from:
git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git
Thanks a lot!
----------------------------------------------------------------
The following changes since commit f53a7ad189594a112167efaf17ea8d0242b5ac00:
r8152: Set memory to all 0xFFs on failed reg reads (2019-08-25 19:52:59 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git
for you to fetch changes up to ede7c460b1da5be7b8ef4efe47f1687babf06408:
bpf: handle 32-bit zext during constant blinding (2019-08-26 23:05:01 +0200)
----------------------------------------------------------------
Jiong Wang (1):
nfp: bpf: fix latency bug when updating stack index register
Naveen N. Rao (1):
bpf: handle 32-bit zext during constant blinding
drivers/net/ethernet/netronome/nfp/bpf/jit.c | 17 +++++++++++++----
kernel/bpf/core.c | 8 ++++++--
2 files changed, 19 insertions(+), 6 deletions(-)
^ permalink raw reply
* Re: [PATCH bpf-next v6 00/12] XDP unaligned chunk placement support
From: Daniel Borkmann @ 2019-08-30 23:29 UTC (permalink / raw)
To: Kevin Laatz, netdev, ast, bjorn.topel, magnus.karlsson,
jakub.kicinski, jonathan.lemon, saeedm, maximmi, stephen
Cc: bruce.richardson, ciara.loftus, bpf, intel-wired-lan
In-Reply-To: <20190827022531.15060-1-kevin.laatz@intel.com>
On 8/27/19 4:25 AM, Kevin Laatz wrote:
> This patch set adds the ability to use unaligned chunks in the XDP umem.
>
> Currently, all chunk addresses passed to the umem are masked to be chunk
> size aligned (max is PAGE_SIZE). This limits where we can place chunks
> within the umem as well as limiting the packet sizes that are supported.
>
> The changes in this patch set removes these restrictions, allowing XDP to
> be more flexible in where it can place a chunk within a umem. By relaxing
> where the chunks can be placed, it allows us to use an arbitrary buffer
> size and place that wherever we have a free address in the umem. These
> changes add the ability to support arbitrary frame sizes up to 4k
> (PAGE_SIZE) and make it easy to integrate with other existing frameworks
> that have their own memory management systems, such as DPDK.
> In DPDK, for example, there is already support for AF_XDP with zero-copy.
> However, with this patch set the integration will be much more seamless.
> You can find the DPDK AF_XDP driver at:
> https://git.dpdk.org/dpdk/tree/drivers/net/af_xdp
>
> Since we are now dealing with arbitrary frame sizes, we need also need to
> update how we pass around addresses. Currently, the addresses can simply be
> masked to 2k to get back to the original address. This becomes less trivial
> when using frame sizes that are not a 'power of 2' size. This patch set
> modifies the Rx/Tx descriptor format to use the upper 16-bits of the addr
> field for an offset value, leaving the lower 48-bits for the address (this
> leaves us with 256 Terabytes, which should be enough!). We only need to use
> the upper 16-bits to store the offset when running in unaligned mode.
> Rather than adding the offset (headroom etc) to the address, we will store
> it in the upper 16-bits of the address field. This way, we can easily add
> the offset to the address where we need it, using some bit manipulation and
> addition, and we can also easily get the original address wherever we need
> it (for example in i40e_zca_free) by simply masking to get the lower
> 48-bits of the address field.
>
> The patch set was tested with the following set up:
> - Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
> - Intel Corporation Ethernet Controller XXV710 for 25GbE SFP28 (rev 02)
> - Driver: i40e
> - Application: xdpsock with l2fwd (single interface)
> - Turbo disabled in BIOS
>
> There are no changes to performance before and after these patches for SKB
> mode and Copy mode. Zero-copy mode saw a performance degradation of ~1.5%.
>
> This patch set has been applied against
> commit 0bb52b0dfc88 ("tools: bpftool: add 'bpftool map freeze' subcommand")
>
> Structure of the patch set:
> Patch 1:
> - Remove unnecessary masking and headroom addition during zero-copy Rx
> buffer recycling in i40e. This change is required in order for the
> buffer recycling to work in the unaligned chunk mode.
>
> Patch 2:
> - Remove unnecessary masking and headroom addition during
> zero-copy Rx buffer recycling in ixgbe. This change is required in
> order for the buffer recycling to work in the unaligned chunk mode.
>
> Patch 3:
> - Add infrastructure for unaligned chunks. Since we are dealing with
> unaligned chunks that could potentially cross a physical page boundary,
> we add checks to keep track of that information. We can later use this
> information to correctly handle buffers that are placed at an address
> where they cross a page boundary. This patch also modifies the
> existing Rx and Tx functions to use the new descriptor format. To
> handle addresses correctly, we need to mask appropriately based on
> whether we are in aligned or unaligned mode.
>
> Patch 4:
> - This patch updates the i40e driver to make use of the new descriptor
> format.
>
> Patch 5:
> - This patch updates the ixgbe driver to make use of the new descriptor
> format.
>
> Patch 6:
> - This patch updates the mlx5e driver to make use of the new descriptor
> format. These changes are required to handle the new descriptor format
> and for unaligned chunks support.
>
> Patch 7:
> - This patch allows XSK frames smaller than page size in the mlx5e
> driver. Relax the requirements to the XSK frame size to allow it to be
> smaller than a page and even not a power of two. The current
> implementation can work in this mode, both with Striding RQ and without
> it.
>
> Patch 8:
> - Add flags for umem configuration to libbpf. Since we increase the size
> of the struct by adding flags, we also need to add the ABI versioning
> in this patch.
>
> Patch 9:
> - Modify xdpsock application to add a command line option for
> unaligned chunks
>
> Patch 10:
> - Since we can now run the application in unaligned chunk mode, we need
> to make sure we recycle the buffers appropriately.
>
> Patch 11:
> - Adds hugepage support to the xdpsock application
>
> Patch 12:
> - Documentation update to include the unaligned chunk scenario. We need
> to explicitly state that the incoming addresses are only masked in the
> aligned chunk mode and not the unaligned chunk mode.
>
> ---
> v2:
> - fixed checkpatch issues
> - fixed Rx buffer recycling for unaligned chunks in xdpsock
> - removed unused defines
> - fixed how chunk_size is calculated in xsk_diag.c
> - added some performance numbers to cover letter
> - modified descriptor format to make it easier to retrieve original
> address
> - removed patch adding off_t off to the zero copy allocator. This is no
> longer needed with the new descriptor format.
>
> v3:
> - added patch for mlx5 driver changes needed for unaligned chunks
> - moved offset handling to new helper function
> - changed value used for the umem chunk_mask. Now using the new
> descriptor format to save us doing the calculations in a number of
> places meaning more of the code is left unchanged while adding
> unaligned chunk support.
>
> v4:
> - reworked the next_pg_contig field in the xdp_umem_page struct. We now
> use the low 12 bits of the addr for flags rather than adding an extra
> field in the struct.
> - modified unaligned chunks flag define
> - fixed page_start calculation in __xsk_rcv_memcpy().
> - move offset handling to the xdp_umem_get_* functions
> - modified the len field in xdp_umem_reg struct. We now use 16 bits from
> this for the flags field.
> - fixed headroom addition to handle in the mlx5e driver
> - other minor changes based on review comments
>
> v5:
> - Added ABI versioning in the libbpf patch
> - Removed bitfields in the xdp_umem_reg struct. Adding new flags field.
> - Added accessors for getting addr and offset.
> - Added helper function for adding the offset to the addr.
> - Fixed conflicts with 'bpf-af-xdp-wakeup' which was merged recently.
> - Fixed typo in mlx driver patch.
> - Moved libbpf patch to later in the set (7/11, just before the sample
> app changes)
>
> v6:
> - Added support for XSK frames smaller than page in mlx5e driver (Maxim
> Mikityanskiy <maximmi@mellanox.com).
> - Fixed offset handling in xsk_generic_rcv.
> - Added check for base address in xskq_is_valid_addr_unaligned.
>
> Kevin Laatz (11):
> i40e: simplify Rx buffer recycle
> ixgbe: simplify Rx buffer recycle
> xsk: add support to allow unaligned chunk placement
> i40e: modify driver for handling offsets
> ixgbe: modify driver for handling offsets
> mlx5e: modify driver for handling offsets
> libbpf: add flags to umem config
> samples/bpf: add unaligned chunks mode support to xdpsock
> samples/bpf: add buffer recycling for unaligned chunks to xdpsock
> samples/bpf: use hugepages in xdpsock app
> doc/af_xdp: include unaligned chunk case
>
> Maxim Mikityanskiy (1):
> net/mlx5e: Allow XSK frames smaller than a page
>
> Documentation/networking/af_xdp.rst | 10 +-
> drivers/net/ethernet/intel/i40e/i40e_xsk.c | 26 +++--
> drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 26 +++--
> .../ethernet/mellanox/mlx5/core/en/params.c | 23 ++++-
> .../ethernet/mellanox/mlx5/core/en/params.h | 2 +
> .../net/ethernet/mellanox/mlx5/core/en/xdp.c | 8 +-
> .../ethernet/mellanox/mlx5/core/en/xsk/rx.c | 5 +-
> .../mellanox/mlx5/core/en/xsk/setup.c | 15 ++-
> include/net/xdp_sock.h | 75 ++++++++++++++-
> include/uapi/linux/if_xdp.h | 9 ++
> net/xdp/xdp_umem.c | 19 +++-
> net/xdp/xsk.c | 94 +++++++++++++++----
> net/xdp/xsk_diag.c | 2 +-
> net/xdp/xsk_queue.h | 70 ++++++++++++--
> samples/bpf/xdpsock_user.c | 61 ++++++++----
> tools/include/uapi/linux/if_xdp.h | 9 ++
> tools/lib/bpf/Makefile | 5 +-
> tools/lib/bpf/libbpf.map | 1 +
> tools/lib/bpf/xsk.c | 33 ++++++-
> tools/lib/bpf/xsk.h | 27 ++++++
> 20 files changed, 417 insertions(+), 103 deletions(-)
>
Applied, thanks!
^ permalink raw reply
* Re: [bpf-next] bpf: fix error check in bpf_tcp_gen_syncookie
From: Daniel Borkmann @ 2019-08-30 23:23 UTC (permalink / raw)
To: Petar Penkov, netdev, bpf; +Cc: davem, ast, Petar Penkov, Stanislav Fomichev
In-Reply-To: <20190827234622.76209-1-ppenkov.kernel@gmail.com>
On 8/28/19 1:46 AM, Petar Penkov wrote:
> From: Petar Penkov <ppenkov@google.com>
>
> If a SYN cookie is not issued by tcp_v#_gen_syncookie, then the return
> value will be exactly 0, rather than <= 0. Let's change the check to
> reflect that, especially since mss is an unsigned value and cannot be
> negative.
>
> Fixes: 70d66244317e ("bpf: add bpf_tcp_gen_syncookie helper")
> Reported-by: Stanislav Fomichev <sdf@google.com>
> Signed-off-by: Petar Penkov <ppenkov@google.com>
Applied, thanks!
^ permalink raw reply
* Re: [PATCH bpf-next 0/2] nfp: bpf: add simple map op cache
From: Daniel Borkmann @ 2019-08-30 23:23 UTC (permalink / raw)
To: Jakub Kicinski, alexei.starovoitov; +Cc: netdev, oss-drivers, jaco.gericke
In-Reply-To: <20190828053629.28658-1-jakub.kicinski@netronome.com>
On 8/28/19 7:36 AM, Jakub Kicinski wrote:
> Hi!
>
> This set adds a small batching and cache mechanism to the driver.
> Map dumps require two operations per element - get next, and
> lookup. Each of those needs a round trip to the device, and on
> a loaded system scheduling out and in of the dumping process.
> This set makes the driver request a number of entries at the same
> time, and if no operation which would modify the map happens
> from the host side those entries are used to serve lookup
> requests for up to 250us, at which point they are considered
> stale.
>
> This set has been measured to provide almost 4x dumping speed
> improvement, Jaco says:
>
> OLD dump times
> 500 000 elements: 26.1s
> 1 000 000 elements: 54.5s
>
> NEW dump times
> 500 000 elements: 7.6s
> 1 000 000 elements: 16.5s
>
> Jakub Kicinski (2):
> nfp: bpf: rework MTU checking
> nfp: bpf: add simple map op cache
>
> drivers/net/ethernet/netronome/nfp/bpf/cmsg.c | 187 ++++++++++++++++--
> drivers/net/ethernet/netronome/nfp/bpf/fw.h | 1 +
> drivers/net/ethernet/netronome/nfp/bpf/main.c | 33 ++++
> drivers/net/ethernet/netronome/nfp/bpf/main.h | 24 +++
> .../net/ethernet/netronome/nfp/bpf/offload.c | 3 +
> drivers/net/ethernet/netronome/nfp/nfp_net.h | 2 +-
> .../ethernet/netronome/nfp/nfp_net_common.c | 9 +-
> 7 files changed, 239 insertions(+), 20 deletions(-)
Applied, thanks!
^ permalink raw reply
* Re: [PATCH bpf-next v2 0/4] tools: bpftool: improve bpftool build experience
From: Daniel Borkmann @ 2019-08-30 23:20 UTC (permalink / raw)
To: Quentin Monnet, Alexei Starovoitov
Cc: bpf, netdev, oss-drivers, Lorenz Bauer, Ilya Leoshkevich,
Jakub Kicinski
In-Reply-To: <20190830110040.31257-1-quentin.monnet@netronome.com>
On 8/30/19 1:00 PM, Quentin Monnet wrote:
> Hi,
> This set attempts to make it easier to build bpftool, in particular when
> passing a specific output directory. This is a follow-up to the
> conversation held last month by Lorenz, Ilya and Jakub [0].
>
> The first patch is a minor fix to bpftool's Makefile, regarding the
> retrieval of kernel version (which currently prints a non-relevant make
> warning on some invocations).
>
> Second patch improves the Makefile commands to support more "make"
> invocations, or to fix building with custom output directory. On Jakub's
> suggestion, a script is also added to BPF selftests in order to keep track
> of the supported build variants.
>
> Building bpftool with "make tools/bpf" from the top of the repository
> generates files in "libbpf/" and "feature/" directories under tools/bpf/
> and tools/bpf/bpftool/. The third patch ensures such directories are taken
> care of on "make clean", and add them to the relevant .gitignore files.
>
> At last, fourth patch is a sligthly modified version of Ilya's fix
> regarding libbpf.a appearing twice on the linking command for bpftool.
>
> [0] https://lore.kernel.org/bpf/CACAyw9-CWRHVH3TJ=Tke2x8YiLsH47sLCijdp=V+5M836R9aAA@mail.gmail.com/
>
> v2:
> - Return error from check script if one of the make invocations returns
> non-zero (even if binary is successfully produced).
> - Run "make clean" from bpf/ and not only bpf/bpftool/ in that same script,
> when relevant.
> - Add a patch to clean up generated "feature/" and "libbpf/" directories.
>
> Cc: Lorenz Bauer <lmb@cloudflare.com>
> Cc: Ilya Leoshkevich <iii@linux.ibm.com>
> Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
>
> Quentin Monnet (4):
> tools: bpftool: ignore make built-in rules for getting kernel version
> tools: bpftool: improve and check builds for different make
> invocations
> tools: bpf: account for generated feature/ and libbpf/ directories
> tools: bpftool: do not link twice against libbpf.a in Makefile
>
> tools/bpf/.gitignore | 1 +
> tools/bpf/Makefile | 5 +-
> tools/bpf/bpftool/.gitignore | 2 +
> tools/bpf/bpftool/Makefile | 28 ++--
> tools/testing/selftests/bpf/Makefile | 3 +-
> .../selftests/bpf/test_bpftool_build.sh | 143 ++++++++++++++++++
> 6 files changed, 167 insertions(+), 15 deletions(-)
> create mode 100755 tools/testing/selftests/bpf/test_bpftool_build.sh
>
Applied, thanks!
^ 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