* Re: [PATCH net-next 4/5] ipv6: enable IFA_IF_NETNSID for RTM_GETADDR
From: Christian Brauner @ 2018-09-03 1:18 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, netdev, linux-kernel, davem, kuznet, yoshfuji,
pombredanne, kstewart, gregkh, dsahern, fw, ktkhai, lucien.xin,
jakub.kicinski, jbenc, nicolas.dichtel
In-Reply-To: <201808310127.xJh9cWoD%fengguang.wu@intel.com>
On Fri, Aug 31, 2018 at 02:41:45AM +0800, kbuild test robot wrote:
> Hi Christian,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on net-next/master]
>
> url: https://github.com/0day-ci/linux/commits/Christian-Brauner/rtnetlink-add-IFA_IF_NETNSID-for-RTM_GETADDR/20180830-194411
> config: x86_64-randconfig-s1-08302022 (attached as .config)
> compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> All errors (new ones prefixed by >>):
>
> >> ERROR: "rtnl_get_net_ns_capable" [net/ipv6/ipv6.ko] undefined!
Fwiw, this is triggered when ipv6 is built as a module. The first
version of my patch did not take that into account and left
rtnl_get_net_ns_capable() unexported. The second version will export
that function and fix this issue.
Christian
^ permalink raw reply
* Re: [PATCH net-next] net/sched: fix type of htb statistics
From: David Miller @ 2018-09-02 20:57 UTC (permalink / raw)
To: florent.fourcot; +Cc: netdev
In-Reply-To: <20180830143923.25122-1-florent.fourcot@wifirst.fr>
From: Florent Fourcot <florent.fourcot@wifirst.fr>
Date: Thu, 30 Aug 2018 16:39:23 +0200
> tokens and ctokens are defined as s64 in htb_class structure,
> and clamped to 32bits value during netlink dumps:
>
> cl->xstats.tokens = clamp_t(s64, PSCHED_NS2TICKS(cl->tokens),
> INT_MIN, INT_MAX);
>
> Defining it as u32 is working since userspace (tc) is printing it as
> signed int, but a correct definition from the beginning is probably
> better.
>
> In the same time, 'giants' structure member is unused since years, so
> update the comment to mark it unused.
>
> Signed-off-by: Florent Fourcot <florent.fourcot@wifirst.fr>
Looks good, applied.
^ permalink raw reply
* Re: [PATCH 2/2] net: ethernet: cpsw-phy-sel: prefer phandle for phy sel
From: David Miller @ 2018-09-02 20:52 UTC (permalink / raw)
To: tony
Cc: netdev, linux-omap, devicetree, andrew, grygorii.strashko,
ivan.khoronzhuk, mark.rutland, m-karicheri2, robh+dt
In-Reply-To: <20180829150024.43210-2-tony@atomide.com>
From: Tony Lindgren <tony@atomide.com>
Date: Wed, 29 Aug 2018 08:00:24 -0700
> The cpsw-phy-sel device is not a child of the cpsw interconnect target
> module. It lives in the system control module.
>
> Let's fix this issue by trying to use cpsw-phy-sel phandle first if it
> exists and if not fall back to current usage of trying to find the
> cpsw-phy-sel child. That way the phy sel driver can be a child of the
> system control module where it belongs in the device tree.
>
> Without this fix, we cannot have a proper interconnect target module
> hierarchy in device tree for things like genpd.
>
> Note that deferred probe is mostly not supported by cpsw and this patch
> does not attempt to fix that. In case deferred probe support is needed,
> this could be added to cpsw_slave_open() and phy_connect() so they start
> handling and returning errors.
>
> For documenting it, looks like the cpsw-phy-sel is used for all cpsw device
> tree nodes. It's missing the related binding documentation, so let's also
> update the binding documentation accordingly.
>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
Applied.
^ permalink raw reply
* Re: [PATCH 1/2] dt-bindings: net: cpsw: Document cpsw-phy-sel usage but prefer phandle
From: David Miller @ 2018-09-02 20:52 UTC (permalink / raw)
To: tony
Cc: netdev, linux-omap, devicetree, andrew, grygorii.strashko,
ivan.khoronzhuk, mark.rutland, m-karicheri2, robh+dt
In-Reply-To: <20180829150024.43210-1-tony@atomide.com>
From: Tony Lindgren <tony@atomide.com>
Date: Wed, 29 Aug 2018 08:00:23 -0700
> The current cpsw usage for cpsw-phy-sel is undocumented but is used for
> all the boards using cpsw. And cpsw-phy-sel is not really a child of
> the cpsw device, it lives in the system control module instead.
>
> Let's document the existing usage, and improve it a bit where we prefer
> to use a phandle instead of a child device for it. That way we can
> properly describe the hardware in dts files for things like genpd.
>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
Applied.
^ permalink raw reply
* Re: [bpf PATCH v2] bpf: avoid misuse of psock when TCP_ULP_BPF collides with another ULP
From: Daniel Borkmann @ 2018-09-02 20:40 UTC (permalink / raw)
To: John Fastabend, ast; +Cc: netdev
In-Reply-To: <20180831042502.15257.35453.stgit@john-Precision-Tower-5810>
On 08/31/2018 06:25 AM, John Fastabend wrote:
> Currently we check sk_user_data is non NULL to determine if the sk
> exists in a map. However, this is not sufficient to ensure the psock
> or the ULP ops are not in use by another user, such as kcm or TLS. To
> avoid this when adding a sock to a map also verify it is of the
> correct ULP type. Additionally, when releasing a psock verify that
> it is the TCP_ULP_BPF type before releasing the ULP. The error case
> where we abort an update due to ULP collision can cause this error
> path.
>
> For example,
>
> __sock_map_ctx_update_elem()
> [...]
> err = tcp_set_ulp_id(sock, TCP_ULP_BPF) <- collides with TLS
> if (err) <- so err out here
> goto out_free
> [...]
> out_free:
> smap_release_sock() <- calling tcp_cleanup_ulp releases the
> TLS ULP incorrectly.
>
> Fixes: 2f857d04601a ("bpf: sockmap, remove STRPARSER map_flags and add multi-map support")
> Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Applied to bpf, thanks John!
^ permalink raw reply
* Re: [PATCH net 0/2] igmp: fix two incorrect unsolicit report count issues
From: David Miller @ 2018-09-02 20:39 UTC (permalink / raw)
To: liuhangbin; +Cc: netdev
In-Reply-To: <1535537171-24533-1-git-send-email-liuhangbin@gmail.com>
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Wed, 29 Aug 2018 18:06:07 +0800
> Just like the subject, fix two minor igmp unsolicit report count issues.
Series applied, thanks.
^ permalink raw reply
* Re: [PATCH bpf-next] tools/bpf: bpftool, add xskmap in map types
From: Daniel Borkmann @ 2018-09-02 20:39 UTC (permalink / raw)
To: Jakub Kicinski, Prashant Bhole; +Cc: Alexei Starovoitov, Quentin Monnet, netdev
In-Reply-To: <20180831104532.22093b6d@cakuba.netronome.com>
On 08/31/2018 10:45 AM, Jakub Kicinski wrote:
> On Fri, 31 Aug 2018 15:32:42 +0900, Prashant Bhole wrote:
>> When listed all maps, bpftool currently shows (null) for xskmap.
>> Added xskmap type in map_type_name[] to show correct type.
>>
>> Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
>
> Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
>
> Thank you! I feel tempted to suggest considering the bpf tree, but
> perhaps that's a stretch..
Applied it to bpf, thanks guys!
^ permalink raw reply
* Re: [PATCH net] bpf: Fix bpf_msg_pull_data()
From: Daniel Borkmann @ 2018-09-02 20:39 UTC (permalink / raw)
To: Tushar Dave, john.fastabend, ast, davem, netdev; +Cc: sowmini.varadhan
In-Reply-To: <1535751916-11880-1-git-send-email-tushar.n.dave@oracle.com>
On 08/31/2018 11:45 PM, Tushar Dave wrote:
> Helper bpf_msg_pull_data() mistakenly reuses variable 'offset' while
> linearizing multiple scatterlist elements. Variable 'offset' is used
> to find first starting scatterlist element
> i.e. msg->data = sg_virt(&sg[first_sg]) + start - offset"
>
> Use different variable name while linearizing multiple scatterlist
> elements so that value contained in variable 'offset' won't get
> overwritten.
>
> Fixes: 015632bb30da ("bpf: sk_msg program helper bpf_sk_msg_pull_data")
> Signed-off-by: Tushar Dave <tushar.n.dave@oracle.com>
Applied to bpf, thanks Tushar!
^ permalink raw reply
* Re: [PATCH net-next v3] tcp: propagate gso_segs to the new skb built in tcp collapse
From: Eric Dumazet @ 2018-09-02 20:34 UTC (permalink / raw)
To: Yafang Shao, edumazet, davem; +Cc: netdev
In-Reply-To: <1535804465-11795-1-git-send-email-laoar.shao@gmail.com>
On 09/01/2018 05:21 AM, Yafang Shao wrote:
> The gso_segs of the new built SKB in tcp collapse is inited to 0,
> that makes us hard to know the accurate segments number of this new SKB.
> We'd better propagate the gso_segs of the collapsed SKB to the new built
> one, so when this SKB is dropped (for example when doing tcp prune) the
> sk_drops will be added to the correct value.
>
> If the collapsed SKB is fully copied to the new built one, we just add its
> gso_segs to the new SKB.
> While if the collapsed SKB is partially copied to the new built SKB,
> we have to calculate how many segments are copied.
> And when do the calculation we must make sure one SKB holds the same
> gso_segs.
> Furthemore, we have to reset the gso_segs of this SKB if is is partially
> copied, so in the next round when the left segments are copied it could
> propagate the correct value.
>
> The gso_size will never exceed 65536 as the max size of the new built SKB
> is 4K.
>
> Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
> ---
> net/ipv4/tcp_input.c | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 62508a2..6dc8e2f 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -4910,6 +4910,7 @@ void tcp_rbtree_insert(struct rb_root *root, struct sk_buff *skb)
> while (before(start, end)) {
> int copy = min_t(int, SKB_MAX_ORDER(0, 0), end - start);
> struct sk_buff *nskb;
> + int len = copy;
>
> nskb = alloc_skb(copy, GFP_ATOMIC);
> if (!nskb)
> @@ -4928,12 +4929,24 @@ void tcp_rbtree_insert(struct rb_root *root, struct sk_buff *skb)
>
> /* Copy data, releasing collapsed skbs. */
> while (copy > 0) {
> - int offset = start - TCP_SKB_CB(skb)->seq;
> int size = TCP_SKB_CB(skb)->end_seq - start;
> + int offset = start - TCP_SKB_CB(skb)->seq;
>
> BUG_ON(offset < 0);
> if (size > 0) {
> - size = min(copy, size);
> + if (copy >= size) {
> + skb_shinfo(nskb)->gso_segs +=
> + max_t(u16, 1, skb_shinfo(skb)->gso_segs);
> + } else {
> + skb_shinfo(nskb)->gso_size =
> + skb_shinfo(skb)->gso_size;
> + skb_shinfo(nskb)->gso_segs =
> + DIV_ROUND_UP(len, skb_shinfo(nskb)->gso_size);
> + skb_shinfo(skb)->gso_segs =
> + DIV_ROUND_UP(size - copy, skb_shinfo(skb)->gso_size);
> + size = copy;
> + }
> +
> if (skb_copy_bits(skb, offset, skb_put(nskb, size), size))
> BUG();
> TCP_SKB_CB(nskb)->end_seq += size;
>
Please stop sending these patches.
1) There is no guarantee a TCP flow receive segments of the same size.
2) There is no guarantee an skb cooked by collapse contains an integral number of segments.
So really this is bloat, and for something that is not accurate anyway.
^ permalink raw reply
* linux-next: build failure after merge of the net-next tree
From: Stephen Rothwell @ 2018-09-02 23:47 UTC (permalink / raw)
To: David Miller, Networking
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Jacob Keller,
Jeff Kirsher, Andrew Bowers
[-- Attachment #1: Type: text/plain, Size: 1353 bytes --]
Hi all,
After merging the net-next tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:
In file included from drivers/net/ethernet/intel/i40e/i40e_ethtool.c:9:
drivers/net/ethernet/intel/i40e/i40e_ethtool.c: In function '__i40e_add_stat_strings':
drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h:193:20: error: function '__i40e_add_stat_strings' can never be inlined because it uses variable argument lists
static inline void __i40e_add_stat_strings(u8 **p, const struct i40e_stats stats[],
^~~~~~~~~~~~~~~~~~~~~~~
Caused by commit
8fd75c58a09a ("i40e: move ethtool stats boiler plate code to i40e_ethtool_stats.h")
It is not clear this patch has any value anyway as the moved functions
are only used in the file they were moved from.
I reverted that commit for today.
The same problem would exist in drivers/net/ethernet/intel/i40evf (where
a lot of code is duplicated from drivers/net/ethernet/intel/i40e) except
that this function is not declared inline there.
Luckily, i40e_ethtool_stats.h is only included my one file
drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c, otherwise there
would be multiple copies of __i40e_add_stat_strings().
Surely there is some scope for factoring out some common code between
these two drivers?
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
* [PATCH bpf-next v2] libbpf: Remove the duplicate checking of function storage
From: Taeung Song @ 2018-09-02 23:30 UTC (permalink / raw)
To: Daniel Borkmann, Alexei Starovoitov; +Cc: netdev, linux-kernel, Jakub Kicinski
After the commit eac7d84519a3 ("tools: libbpf: don't return '.text'
as a program for multi-function programs"), bpf_program__next()
in bpf_object__for_each_program skips the function storage such as .text,
so eliminate the duplicate checking.
Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
---
tools/lib/bpf/libbpf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 2abd0f112627..8476da7f2720 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -2336,7 +2336,7 @@ int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr,
bpf_program__set_expected_attach_type(prog,
expected_attach_type);
- if (!bpf_program__is_function_storage(prog, obj) && !first_prog)
+ if (!first_prog)
first_prog = prog;
}
--
2.17.1
^ permalink raw reply related
* [PATCH net-next 4/4] net/mlx5e: IPoIB, Use priv stats in completion rx flow
From: Tariq Toukan @ 2018-09-02 19:12 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, Eran Ben Elisha, Saeed Mahameed, Feras Daoud,
Tariq Toukan
In-Reply-To: <1535915530-2874-1-git-send-email-tariqt@mellanox.com>
From: Feras Daoud <ferasda@mellanox.com>
Since the RQs are shared between all pkey interfaces, the stats
should be taken from where the per-ring stats are stored instead
of the parent RQ.
Fixes: 4c6c615e3f30 ("net/mlx5e: IPoIB, Add PKEY child interface nic profile")
Signed-off-by: Feras Daoud <ferasda@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
index 15d8ae28c040..6a959e8b1f9d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
@@ -1230,8 +1230,8 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e_rq *rq,
u32 cqe_bcnt,
struct sk_buff *skb)
{
- struct mlx5e_rq_stats *stats = rq->stats;
struct hwtstamp_config *tstamp;
+ struct mlx5e_rq_stats *stats;
struct net_device *netdev;
struct mlx5e_priv *priv;
char *pseudo_header;
@@ -1254,6 +1254,7 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e_rq *rq,
priv = mlx5i_epriv(netdev);
tstamp = &priv->tstamp;
+ stats = &priv->channel_stats[rq->ix].rq;
g = (be32_to_cpu(cqe->flags_rqpn) >> 28) & 3;
dgid = skb->data + MLX5_IB_GRH_DGID_OFFSET;
--
1.8.3.1
^ permalink raw reply related
* [PATCH net-next 3/4] net/mlx5e: IPoIB, Add ndo stats support for IPoIB child devices
From: Tariq Toukan @ 2018-09-02 19:12 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, Eran Ben Elisha, Saeed Mahameed, Feras Daoud,
Tariq Toukan
In-Reply-To: <1535915530-2874-1-git-send-email-tariqt@mellanox.com>
From: Feras Daoud <ferasda@mellanox.com>
Expose RX and TX counters by implementing ndo_get_stats64 operation
for child devices.
Signed-off-by: Feras Daoud <ferasda@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c
index 54a188f41f90..e3e8a5f1ac9b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c
@@ -146,6 +146,7 @@ struct net_device *mlx5i_pkey_get_netdev(struct net_device *netdev, u32 qpn)
.ndo_open = mlx5i_pkey_open,
.ndo_stop = mlx5i_pkey_close,
.ndo_init = mlx5i_pkey_dev_init,
+ .ndo_get_stats64 = mlx5i_get_stats,
.ndo_uninit = mlx5i_pkey_dev_cleanup,
.ndo_change_mtu = mlx5i_pkey_change_mtu,
.ndo_do_ioctl = mlx5i_pkey_ioctl,
--
1.8.3.1
^ permalink raw reply related
* [PATCH net-next 0/4] mlx5e IPoIB stats
From: Tariq Toukan @ 2018-09-02 19:12 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, Eran Ben Elisha, Saeed Mahameed, Feras Daoud,
Tariq Toukan
Hi Dave,
I am temporarily covering Saeed with the mlx5 submissions.
This patchset by Feras contains statistics enhancements and NDO
implementation for the mlx5e IPoIB driver.
Series generated against net-next commit:
2d5c28859839 net: bgmac: remove set but not used variable 'err'
Thanks,
Tariq.
Feras Daoud (4):
net/mlx5e: IPoIB, Initialize max_opened_tc in mlx5i_init flow
net/mlx5e: IPoIB, Add ndo stats support for IPoIB netdevices
net/mlx5e: IPoIB, Add ndo stats support for IPoIB child devices
net/mlx5e: IPoIB, Use priv stats in completion rx flow
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 3 +-
.../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 43 ++++++++++++++++++++++
.../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h | 1 +
.../ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c | 1 +
4 files changed, 47 insertions(+), 1 deletion(-)
--
1.8.3.1
^ permalink raw reply
* [PATCH net-next 2/4] net/mlx5e: IPoIB, Add ndo stats support for IPoIB netdevices
From: Tariq Toukan @ 2018-09-02 19:12 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, Eran Ben Elisha, Saeed Mahameed, Feras Daoud,
Tariq Toukan
In-Reply-To: <1535915530-2874-1-git-send-email-tariqt@mellanox.com>
From: Feras Daoud <ferasda@mellanox.com>
Expose RX and TX counters by implementing ndo_get_stats64 operation for
both parent devices.
After this change, all the relevant statistics can be retrieved using
ifconfig.
Signed-off-by: Feras Daoud <ferasda@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
---
.../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 42 ++++++++++++++++++++++
.../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h | 1 +
2 files changed, 43 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
index 37a670b6a208..48886b3ed320 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
@@ -45,6 +45,7 @@
static const struct net_device_ops mlx5i_netdev_ops = {
.ndo_open = mlx5i_open,
.ndo_stop = mlx5i_close,
+ .ndo_get_stats64 = mlx5i_get_stats,
.ndo_init = mlx5i_dev_init,
.ndo_uninit = mlx5i_dev_cleanup,
.ndo_change_mtu = mlx5i_change_mtu,
@@ -115,6 +116,47 @@ static void mlx5i_cleanup(struct mlx5e_priv *priv)
/* Do nothing .. */
}
+void mlx5i_grp_sw_update_stats(struct mlx5e_priv *priv)
+{
+ struct mlx5e_sw_stats s = { 0 };
+ int i, j;
+
+ for (i = 0; i < priv->profile->max_nch(priv->mdev); i++) {
+ struct mlx5e_channel_stats *channel_stats;
+ struct mlx5e_rq_stats *rq_stats;
+
+ channel_stats = &priv->channel_stats[i];
+ rq_stats = &channel_stats->rq;
+
+ s.rx_packets += rq_stats->packets;
+ s.rx_bytes += rq_stats->bytes;
+
+ for (j = 0; j < priv->max_opened_tc; j++) {
+ struct mlx5e_sq_stats *sq_stats = &channel_stats->sq[j];
+
+ s.tx_packets += sq_stats->packets;
+ s.tx_bytes += sq_stats->bytes;
+ s.tx_queue_dropped += sq_stats->dropped;
+ }
+ }
+
+ memcpy(&priv->stats.sw, &s, sizeof(s));
+}
+
+void mlx5i_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats)
+{
+ struct mlx5e_priv *priv = mlx5i_epriv(dev);
+ struct mlx5e_sw_stats *sstats = &priv->stats.sw;
+
+ mlx5i_grp_sw_update_stats(priv);
+
+ stats->rx_packets = sstats->rx_packets;
+ stats->rx_bytes = sstats->rx_bytes;
+ stats->tx_packets = sstats->tx_packets;
+ stats->tx_bytes = sstats->tx_bytes;
+ stats->tx_dropped = sstats->tx_queue_dropped;
+}
+
int mlx5i_init_underlay_qp(struct mlx5e_priv *priv)
{
struct mlx5_core_dev *mdev = priv->mdev;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h
index 08eac92fc26c..2e7fb829e1b0 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h
@@ -121,6 +121,7 @@ static inline void mlx5i_sq_fetch_wqe(struct mlx5e_txqsq *sq,
netdev_tx_t mlx5i_sq_xmit(struct mlx5e_txqsq *sq, struct sk_buff *skb,
struct mlx5_av *av, u32 dqpn, u32 dqkey);
void mlx5i_handle_rx_cqe(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe);
+void mlx5i_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats);
#endif /* CONFIG_MLX5_CORE_IPOIB */
#endif /* __MLX5E_IPOB_H__ */
--
1.8.3.1
^ permalink raw reply related
* [PATCH net-next 1/4] net/mlx5e: IPoIB, Initialize max_opened_tc in mlx5i_init flow
From: Tariq Toukan @ 2018-09-02 19:12 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, Eran Ben Elisha, Saeed Mahameed, Feras Daoud,
Tariq Toukan
In-Reply-To: <1535915530-2874-1-git-send-email-tariqt@mellanox.com>
From: Feras Daoud <ferasda@mellanox.com>
Enhanced ipoib does not initialize max_opened_tc causing wrong ethtool
statistics. As mlx5e_grp_sw_update_stats relies on this variable, without
this change, the TX statistics will not be updated.
Fixes: 05909babce53 ("net/mlx5e: Avoid reset netdev stats on configuration changes")
Signed-off-by: Feras Daoud <ferasda@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
index e3797a44e074..37a670b6a208 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
@@ -83,6 +83,7 @@ void mlx5i_init(struct mlx5_core_dev *mdev,
priv->netdev = netdev;
priv->profile = profile;
priv->ppriv = ppriv;
+ priv->max_opened_tc = 1;
mutex_init(&priv->state_lock);
mlx5_query_port_max_mtu(mdev, &max_mtu, 1);
--
1.8.3.1
^ permalink raw reply related
* Re: [PATCH net-next] tcp: remove useless add operation when init sysctl_max_tw_buckets
From: David Miller @ 2018-09-02 23:13 UTC (permalink / raw)
To: laoar.shao; +Cc: edumazet, netdev, linux-kernel
In-Reply-To: <1535804465-11795-2-git-send-email-laoar.shao@gmail.com>
From: Yafang Shao <laoar.shao@gmail.com>
Date: Sat, 1 Sep 2018 20:21:05 +0800
> cp_hashinfo.ehash_mask is always an odd number, which is set in function
> alloc_large_system_hash(). See bellow,
> if (_hash_mask)
> *_hash_mask = (1 << log2qty) - 1; <<< always odd number
>
> Hence the local variable 'cnt' is a even number, as a result of that it is
> no difference to do the incrementation here.
>
> Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] net: nixge: Fix Kconfig warning with OF_MDIO
From: David Miller @ 2018-09-02 23:10 UTC (permalink / raw)
To: mdf; +Cc: netdev, linux-kernel, andrew, moritz.fischer, linux-next
In-Reply-To: <20180831203054.12132-1-mdf@kernel.org>
From: Moritz Fischer <mdf@kernel.org>
Date: Fri, 31 Aug 2018 13:30:54 -0700
> Fix Kconfig warning with OF_MDIO where OF_MDIO was
> selected unconditionally instead of only when
> OF is actually enabled.
>
> Fixes 7e8d5755be0e ("net: nixge: Add support for 64-bit platforms")
> Suggested-by: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Moritz Fischer <mdf@kernel.org>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] net: cadence: Fix a sleep-in-atomic-context bug in macb_halt_tx()
From: David Miller @ 2018-09-02 23:05 UTC (permalink / raw)
To: baijiaju1990; +Cc: nicolas.ferre, netdev, linux-kernel
In-Reply-To: <20180901121105.436-1-baijiaju1990@gmail.com>
From: Jia-Ju Bai <baijiaju1990@gmail.com>
Date: Sat, 1 Sep 2018 20:11:05 +0800
> The kernel module may sleep with holding a spinlock.
>
> The function call paths (from bottom to top) in Linux-4.16 are:
>
> [FUNC] usleep_range
> drivers/net/ethernet/cadence/macb_main.c, 648:
> usleep_range in macb_halt_tx
> drivers/net/ethernet/cadence/macb_main.c, 730:
> macb_halt_tx in macb_tx_error_task
> drivers/net/ethernet/cadence/macb_main.c, 721:
> _raw_spin_lock_irqsave in macb_tx_error_task
>
> To fix this bug, usleep_range() is replaced with udelay().
>
> This bug is found by my static analysis tool DSAC.
>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] net: scm: Fix a possible sleep-in-atomic-context bug in scm_fp_copy()
From: David Miller @ 2018-09-02 23:01 UTC (permalink / raw)
To: baijiaju1990
Cc: ktkhai, viro, adobriyan, dvlasenk, xiyou.wangcong, netdev,
linux-kernel
In-Reply-To: <20180901100026.16956-1-baijiaju1990@gmail.com>
From: Jia-Ju Bai <baijiaju1990@gmail.com>
Date: Sat, 1 Sep 2018 18:00:26 +0800
> The kernel module may sleep with holding a spinlock.
>
> The function call paths (from bottom to top) in Linux-4.16 are:
>
> [FUNC] kmalloc(GFP_KERNEL)
> net/core/scm.c, 85: kmalloc in scm_fp_copy
> net/core/scm.c, 161: scm_fp_copy in __scm_send
> ./include/net/scm.h, 88: __scm_send in scm_send
> net/unix/af_unix.c, 1600: scm_send in maybe_init_creds
> net/unix/af_unix.c, 1983: maybe_init_creds in unix_stream_sendpage
> net/unix/af_unix.c, 1973: spin_lock in unix_stream_sendpage
Please, do a full analysis of the code for these changes you are
submitting.
Read maybe_init_creds(), it sets msg.msg_controllen to zero.
struct msghdr msg = { .msg_controllen = 0 };
When that is zero, __scm__send() is never called.
static __inline__ int scm_send(struct socket *sock, struct msghdr *msg,
struct scm_cookie *scm, bool forcecreds)
{
...
if (msg->msg_controllen <= 0)
return 0;
return __scm_send(sock, msg, scm);
If this bug existed, sleeping in atomic warnings would be triggering
all the time and people would report that.
^ permalink raw reply
* Re: [PATCH RFC net-next 00/18] net: Improve route scalability via support for nexthop objects
From: David Miller @ 2018-09-02 17:34 UTC (permalink / raw)
To: dsahern; +Cc: netdev, roopa, sharpd, idosch, dsahern
In-Reply-To: <20180901004954.7145-1-dsahern@kernel.org>
From: dsahern@kernel.org
Date: Fri, 31 Aug 2018 17:49:35 -0700
> Examples
> 1. Single path
> $ ip nexthop add id 1 via 10.99.1.2 dev veth1
> $ ip route add 10.1.1.0/24 nhid 1
>
> $ ip next ls
> id 1 via 10.99.1.2 src 10.99.1.1 dev veth1 scope link
>
> $ ip ro ls
> 10.1.1.0/24 nhid 1 scope link
> ...
First of all, this whole idea is awesome! But, you knew that already. :)
However, I worry what happesn in a mixed environment where we have routing
daemons and tools inserting nexthop based routes, and some doing things
the old way using and expecting inline nexthop information in the routes.
That mixed environment situation has to function correctly. Older
apps have to see the per-route nexthop info in the format and layout
they expect (gw/dev pairs). They cannot be expected to just studdenly
understand the nexthop ID etc.
Otherwise the concept and ideas are fine, so as long as you can resolve
the mixed environment situation I fully support this work and look forward
to it being in a state where I can integrate it :-)
^ permalink raw reply
* linux-next: Signed-off-by missing for commit in the net-next tree
From: Stephen Rothwell @ 2018-09-02 21:40 UTC (permalink / raw)
To: David Miller, Networking
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Vakul Garg
[-- Attachment #1: Type: text/plain, Size: 194 bytes --]
Hi all,
Commit
c2ad647c6442 ("selftests/tls: Add test for recv(PEEK) spanning across multiple records")
is missing a Signed-off-by from its author.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
* [PATCH net-next 03/12] net: phy: bcm63xx: Allow to be built with COMPILE_TEST
From: Andrew Lunn @ 2018-09-02 17:06 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Florian Fainelli, maxime.chevallier, Andrew Lunn
In-Reply-To: <1535908001-18593-1-git-send-email-andrew@lunn.ch>
There is nothing in this driver which prevents it to be compiled for
other architectures. Add COMPILE_TEST so we get better compile test
coverage.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/phy/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 82070792edbb..3d187cd50eb0 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -240,7 +240,7 @@ config AT803X_PHY
config BCM63XX_PHY
tristate "Broadcom 63xx SOCs internal PHY"
- depends on BCM63XX
+ depends on BCM63XX || COMPILE_TEST
select BCM_NET_PHYLIB
---help---
Currently supports the 6348 and 6358 PHYs.
--
2.19.0.rc1
^ permalink raw reply related
* [PATCH net-next 00/12] Preparing for phylib limkmodes
From: Andrew Lunn @ 2018-09-02 17:06 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Florian Fainelli, maxime.chevallier, Andrew Lunn
phylib currently makes us of a u32 bitmap for advertising, supported,
and link partner capabilities. For a long time, this has been
sufficient, for devices up to 1Gbps. With more MAC/PHY combinations
now supporting speeds greater than 1Gbps, we have run out of
bits. There is the need to replace this u32 with an
__ETHTOOL_DECLARE_LINK_MODE_MASK, which makes use of linux's generic
bitmaps.
This patchset does some of the work preparing for this change. A few
cleanups are applied to PHY drivers. Some MAC drivers directly access
members of phydev which are going to change type. These patches adds
some helpers and swaps MAC drivers to use them, mostly dealing with
Pause configuration.
---
The full ~25 patch patchset can be found in the unstable branch
v4.19-rc1-net-next-phy-link-mask
Andrew Lunn (12):
net: phy: ste10Xp: Remove wrong SUPPORTED_Pause
net: phy: et1011c: Remove incorrect missing 1000 Half
net: phy: bcm63xx: Allow to be built with COMPILE_TEST
net: ethernet: Use phy_set_max_speed() to limit advertised speed
net: ethernet: genet: Fix speed selection
net: ethernet: Fix up drivers masking pause support
net: ethernet: Add helper to remove a supported link mode
net: ethernet: Add helper for MACs which support asym pause
net: ethernet: Add helper for MACs which support pause
net: ethernet: Add helper for set_pauseparam for Asym Pause
net: ethernet: Add helper for set_pauseparam for Pause
net: ethernet: Add helper to determine if pause configuration is
supported
drivers/net/ethernet/8390/ax88796.c | 4 +-
drivers/net/ethernet/aeroflex/greth.c | 4 +-
drivers/net/ethernet/agere/et131x.c | 12 +-
drivers/net/ethernet/allwinner/sun4i-emac.c | 3 +-
drivers/net/ethernet/altera/altera_tse_main.c | 5 +-
drivers/net/ethernet/amd/au1000_eth.c | 12 +-
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 4 +-
.../ethernet/apm/xgene/xgene_enet_ethtool.c | 30 +----
.../net/ethernet/apm/xgene/xgene_enet_hw.c | 10 +-
drivers/net/ethernet/aurora/nb8800.c | 9 +-
drivers/net/ethernet/broadcom/bcm63xx_enet.c | 16 +--
drivers/net/ethernet/broadcom/genet/bcmmii.c | 9 +-
drivers/net/ethernet/broadcom/sb1250-mac.c | 14 +--
drivers/net/ethernet/broadcom/tg3.c | 59 +++-------
drivers/net/ethernet/cadence/macb_main.c | 9 +-
drivers/net/ethernet/cortina/gemini.c | 5 +-
drivers/net/ethernet/dnet.c | 8 +-
drivers/net/ethernet/ethoc.c | 5 +-
drivers/net/ethernet/faraday/ftgmac100.c | 16 +--
.../net/ethernet/freescale/dpaa/dpaa_eth.c | 3 +-
.../ethernet/freescale/dpaa/dpaa_ethtool.c | 30 +----
drivers/net/ethernet/freescale/fec_main.c | 19 +--
drivers/net/ethernet/freescale/gianfar.c | 4 +-
.../net/ethernet/freescale/gianfar_ethtool.c | 57 ++++-----
drivers/net/ethernet/freescale/ucc_geth.c | 7 +-
.../hisilicon/hns3/hns3pf/hclge_main.c | 8 +-
.../hisilicon/hns3/hns3pf/hclge_mdio.c | 4 +-
drivers/net/ethernet/lantiq_etop.c | 11 +-
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 8 +-
drivers/net/ethernet/microchip/lan743x_main.c | 7 +-
drivers/net/ethernet/nxp/lpc_eth.c | 3 +-
drivers/net/ethernet/rdc/r6040.c | 12 +-
drivers/net/ethernet/renesas/ravb_main.c | 3 +-
.../net/ethernet/samsung/sxgbe/sxgbe_main.c | 4 +-
drivers/net/ethernet/smsc/smsc911x.c | 6 +-
drivers/net/ethernet/smsc/smsc9420.c | 6 +-
drivers/net/ethernet/socionext/sni_ave.c | 15 +--
.../net/ethernet/stmicro/stmmac/stmmac_main.c | 15 ++-
drivers/net/ethernet/toshiba/tc35815.c | 2 +-
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 3 +-
drivers/net/phy/Kconfig | 2 +-
drivers/net/phy/et1011c.c | 2 +-
drivers/net/phy/phy_device.c | 109 ++++++++++++++++++
drivers/net/phy/ste10Xp.c | 4 +-
drivers/net/usb/lan78xx.c | 2 +-
drivers/staging/mt7621-eth/mdio.c | 2 +-
include/linux/phy.h | 7 ++
47 files changed, 254 insertions(+), 335 deletions(-)
--
2.19.0.rc1
^ permalink raw reply
* [PATCH net-next 01/12] net: phy: ste10Xp: Remove wrong SUPPORTED_Pause
From: Andrew Lunn @ 2018-09-02 17:06 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Florian Fainelli, maxime.chevallier, Andrew Lunn
In-Reply-To: <1535908001-18593-1-git-send-email-andrew@lunn.ch>
The PHY driver should not indicate that Pause is supported. It is upto
the MAC drive enable it, if it supports Pause frames. So remove it
from the ste10Xp driver.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/phy/ste10Xp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/ste10Xp.c b/drivers/net/phy/ste10Xp.c
index fbd548a1ad84..2fe9a87b55b5 100644
--- a/drivers/net/phy/ste10Xp.c
+++ b/drivers/net/phy/ste10Xp.c
@@ -86,7 +86,7 @@ static struct phy_driver ste10xp_pdriver[] = {
.phy_id = STE101P_PHY_ID,
.phy_id_mask = 0xfffffff0,
.name = "STe101p",
- .features = PHY_BASIC_FEATURES | SUPPORTED_Pause,
+ .features = PHY_BASIC_FEATURES,
.flags = PHY_HAS_INTERRUPT,
.config_init = ste10Xp_config_init,
.ack_interrupt = ste10Xp_ack_interrupt,
@@ -97,7 +97,7 @@ static struct phy_driver ste10xp_pdriver[] = {
.phy_id = STE100P_PHY_ID,
.phy_id_mask = 0xffffffff,
.name = "STe100p",
- .features = PHY_BASIC_FEATURES | SUPPORTED_Pause,
+ .features = PHY_BASIC_FEATURES,
.flags = PHY_HAS_INTERRUPT,
.config_init = ste10Xp_config_init,
.ack_interrupt = ste10Xp_ack_interrupt,
--
2.19.0.rc1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox