* Re: [PATCH net-next v2 1/3] net: ipv6: Allow shorthand delete of all nexthops in multipath route
From: David Miller @ 2017-01-17 0:51 UTC (permalink / raw)
To: dsa; +Cc: netdev, ddutt
In-Reply-To: <1484510826-2723-2-git-send-email-dsa@cumulusnetworks.com>
From: David Ahern <dsa@cumulusnetworks.com>
Date: Sun, 15 Jan 2017 12:07:04 -0800
> @@ -2143,6 +2143,26 @@ int ip6_del_rt(struct rt6_info *rt)
> return __ip6_del_rt(rt, &info);
> }
>
> +/* called with table lock held */
...
> @@ -2176,10 +2196,9 @@ static int ip6_route_del(struct fib6_config *cfg)
> continue;
> if (cfg->fc_protocol && cfg->fc_protocol != rt->rt6i_protocol)
> continue;
> - dst_hold(&rt->dst);
> - read_unlock_bh(&table->tb6_lock);
>
> - return __ip6_del_rt(rt, &cfg->fc_nlinfo);
> + err = __ip6_route_del(rt, cfg);
> + break;
> }
fib6_del() (invoked by __ip6_route_del()) has to be invoked with the
table lock held a sa writer, but here you are only holding it as a
reader.
I also think some more thought has to be put into whether we can
change behavior like this without using a flag, as suggested by Roopa.
^ permalink raw reply
* Re: [PATCH v2 net-next 0/2] mvneta xmit_more and bql support
From: David Miller @ 2017-01-17 1:13 UTC (permalink / raw)
To: mw
Cc: thomas.petazzoni, andrew, linux, jason, netdev, linux-kernel, jaz,
gregory.clement, linux-arm-kernel, sebastian.hesselbarth
In-Reply-To: <1484586512-16412-1-git-send-email-mw@semihalf.com>
From: Marcin Wojtas <mw@semihalf.com>
Date: Mon, 16 Jan 2017 18:08:30 +0100
> This is a delayed v2 of short patchset, which introduces xmit_more and BQL
> to mvneta driver. The only one change was added in xmit_more support -
> condition check preventing excessive descriptors concatenation before
> flushing in HW.
>
> Any comments or feedback would be welcome.
...
> Changelog:
> v1 -> v2:
>
> * Add checking condition that ensures too much descriptors are not
> concatenated before flushing in HW.
Looks good, series applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next v2 1/3] net: ipv6: Allow shorthand delete of all nexthops in multipath route
From: David Miller @ 2017-01-17 1:37 UTC (permalink / raw)
To: dsa; +Cc: netdev, ddutt
In-Reply-To: <06d4b3c0-0713-04b8-32d2-99b9b083b825@cumulusnetworks.com>
From: David Ahern <dsa@cumulusnetworks.com>
Date: Mon, 16 Jan 2017 18:27:36 -0700
> On 1/16/17 5:51 PM, David Miller wrote:
>> From: David Ahern <dsa@cumulusnetworks.com>
>> Date: Sun, 15 Jan 2017 12:07:04 -0800
>>
>>> @@ -2143,6 +2143,26 @@ int ip6_del_rt(struct rt6_info *rt)
>>> return __ip6_del_rt(rt, &info);
>>> }
>>>
>>> +/* called with table lock held */
>> ...
>>> @@ -2176,10 +2196,9 @@ static int ip6_route_del(struct fib6_config *cfg)
>>> continue;
>>> if (cfg->fc_protocol && cfg->fc_protocol != rt->rt6i_protocol)
>>> continue;
>>> - dst_hold(&rt->dst);
>>> - read_unlock_bh(&table->tb6_lock);
>>>
>>> - return __ip6_del_rt(rt, &cfg->fc_nlinfo);
>>> + err = __ip6_route_del(rt, cfg);
>>> + break;
>>> }
>>
>> fib6_del() (invoked by __ip6_route_del()) has to be invoked with the
>> table lock held a sa writer, but here you are only holding it as a
>> reader.
>
> That table lock is still held. If you look up 2 lines I remove the line that releases the lock.
It's held in this function as a reader, it needs to be held as a writer.
That's why the lock is dropped in the current code and the existing
wrapper around fib6_del() takes it as a writer.
Is it clear now?
read_lock_bh(&table->lock);
fib6_del();
is invalid.
write_lock_bh(&table->lock);
fib6_del();
is required.
^ permalink raw reply
* Re: [PATCH net-next v2 1/3] net: ipv6: Allow shorthand delete of all nexthops in multipath route
From: David Ahern @ 2017-01-17 1:38 UTC (permalink / raw)
To: David Miller; +Cc: netdev, ddutt
In-Reply-To: <20170116.203717.949572770050738032.davem@davemloft.net>
On 1/16/17 6:37 PM, David Miller wrote:
> Is it clear now?
yes. time for a trip to the eye doctor
^ permalink raw reply
* Re: fq_codel and skb->hash
From: Eric Dumazet @ 2017-01-17 1:44 UTC (permalink / raw)
To: Andrew Collins; +Cc: netdev, edumazet
In-Reply-To: <f9913fca-da16-8620-d237-d7d8d09cced2@cradlepoint.com>
On Mon, 2017-01-16 at 17:04 -0700, Andrew Collins wrote:
> The fq_codel packet scheduler always regenerates the skb flow hash. Is there any reason
> to do this other than the recent hash perturbation additions?
>
> I ask because I have a case where an incoming set of TCP flows is encapsulated in a
> single ipsec tunnel, which is then classified on egress into a single flow by fq_codel
> resulting in poor behavior.
>
> Reusing the skb hash set in receive results in much better behavior, as the value is
> determined pre-encapsulation and flows end up being distributed more naturally across
> codel queues.
>
> Is opportunistically using the pre-existing skb hash (if available) problematic?
I guess this would be fine.
We never exported the 'perturbation' or allowed to change/set it.
The only 'risk' would be having a buggy device setting a wrong L4
skb->hash, or buggy protocol messing with skb->hash for a given flow.
> Is there a better way to manage flow separation in routed+encapsulated traffic?
Encapsulated traffic is fine, since flow dissector skips encap header(s)
up to the L4 header.
Problem is about encrypted traffic, since presumably this L4 header is
opaque for flow dissector ;)
^ permalink raw reply
* Re: [PATCH net-next v2 1/3] net: ipv6: Allow shorthand delete of all nexthops in multipath route
From: David Ahern @ 2017-01-17 1:27 UTC (permalink / raw)
To: David Miller; +Cc: netdev, ddutt
In-Reply-To: <20170116.195139.2265183195514595519.davem@davemloft.net>
On 1/16/17 5:51 PM, David Miller wrote:
> From: David Ahern <dsa@cumulusnetworks.com>
> Date: Sun, 15 Jan 2017 12:07:04 -0800
>
>> @@ -2143,6 +2143,26 @@ int ip6_del_rt(struct rt6_info *rt)
>> return __ip6_del_rt(rt, &info);
>> }
>>
>> +/* called with table lock held */
> ...
>> @@ -2176,10 +2196,9 @@ static int ip6_route_del(struct fib6_config *cfg)
>> continue;
>> if (cfg->fc_protocol && cfg->fc_protocol != rt->rt6i_protocol)
>> continue;
>> - dst_hold(&rt->dst);
>> - read_unlock_bh(&table->tb6_lock);
>>
>> - return __ip6_del_rt(rt, &cfg->fc_nlinfo);
>> + err = __ip6_route_del(rt, cfg);
>> + break;
>> }
>
> fib6_del() (invoked by __ip6_route_del()) has to be invoked with the
> table lock held a sa writer, but here you are only holding it as a
> reader.
That table lock is still held. If you look up 2 lines I remove the line that releases the lock.
>
> I also think some more thought has to be put into whether we can
> change behavior like this without using a flag, as suggested by Roopa.
>
I'm all for changing the behavior by default, but AIUI that breaks the golden rule.
libnl as of libnl3_2_16-16-g29b71371e764 (a patch by Roopa) already handles both flavors -- if RTA_MULTIPATH is sent it handles it fine and if a series of routes are sent they are consolidated to 1 object with next hops.
iproute2 can handle it just fine as well. I made no changes to get the display format consistent. The problem here is scripts that rely on the old format.
quagga does *not* correctly handle the RTA_MULTIPATH attribute for IPv6 but then it does not properly handle IPv6 multipath routes it receives from the kernel at all. Same result with current kernel code or with this patch set - only the last nexthop is retained. (quagga routes pushed to kernel works, but kernel routes fed to quagga does not)
^ permalink raw reply
* [PATCH] qed: Replace memset with eth_zero_addr
From: Shyam Saini @ 2017-01-17 2:05 UTC (permalink / raw)
To: Yuval.Mintz; +Cc: Ariel.Elior, everest-linux-l2, netdev, Shyam Saini
Use eth_zero_addr to assign zero address to the given address array
instead of memset when the second argument in memset is address
of zero. Also, it makes the code clearer
Signed-off-by: Shyam Saini <mayhs11saini@gmail.com>
---
drivers/net/ethernet/qlogic/qed/qed_l2.c | 2 +-
drivers/net/ethernet/qlogic/qed/qed_sriov.c | 7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_l2.c b/drivers/net/ethernet/qlogic/qed/qed_l2.c
index c92a850..7520eb3 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_l2.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_l2.c
@@ -1846,7 +1846,7 @@ static int qed_fill_eth_dev_info(struct qed_dev *cdev,
qed_fill_dev_info(cdev, &info->common);
if (IS_VF(cdev))
- memset(info->common.hw_mac, 0, ETH_ALEN);
+ eth_zero_addr(info->common.hw_mac);
return 0;
}
diff --git a/drivers/net/ethernet/qlogic/qed/qed_sriov.c b/drivers/net/ethernet/qlogic/qed/qed_sriov.c
index b121364..3f4bf31 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_sriov.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_sriov.c
@@ -1224,7 +1224,7 @@ static void qed_iov_clean_vf(struct qed_hwfn *p_hwfn, u8 vfid)
return;
/* Clear the VF mac */
- memset(vf_info->mac, 0, ETH_ALEN);
+ eth_zero_addr(vf_info->mac);
vf_info->rx_accept_mode = 0;
vf_info->tx_accept_mode = 0;
@@ -2626,8 +2626,7 @@ static int qed_iov_vf_update_mac_shadow(struct qed_hwfn *p_hwfn,
for (i = 0; i < QED_ETH_VF_NUM_MAC_FILTERS; i++) {
if (ether_addr_equal(p_vf->shadow_config.macs[i],
p_params->mac)) {
- memset(p_vf->shadow_config.macs[i], 0,
- ETH_ALEN);
+ eth_zero_addr(p_vf->shadow_config.macs[i]);
break;
}
}
@@ -2640,7 +2639,7 @@ static int qed_iov_vf_update_mac_shadow(struct qed_hwfn *p_hwfn,
} else if (p_params->opcode == QED_FILTER_REPLACE ||
p_params->opcode == QED_FILTER_FLUSH) {
for (i = 0; i < QED_ETH_VF_NUM_MAC_FILTERS; i++)
- memset(p_vf->shadow_config.macs[i], 0, ETH_ALEN);
+ eth_zero_addr(p_vf->shadow_config.macs[i]);
}
/* List the new MAC address */
--
2.7.4
^ permalink raw reply related
* [PATCH net-next 1/1] net: ping: Use right format specifier to avoid type casting
From: fgao @ 2017-01-17 2:21 UTC (permalink / raw)
To: davem, kuznet, jmorris, netdev, gfree.wind; +Cc: Gao Feng
From: Gao Feng <fgao@ikuai8.com>
The inet_num is u16, so use %hu instead of casting it to int. And
the sk_bound_dev_if is int actually, so it needn't cast to int.
Signed-off-by: Gao Feng <fgao@ikuai8.com>
---
net/ipv4/ping.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index 86cca61..592db6a 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -433,9 +433,9 @@ int ping_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
goto out;
}
- pr_debug("after bind(): num = %d, dif = %d\n",
- (int)isk->inet_num,
- (int)sk->sk_bound_dev_if);
+ pr_debug("after bind(): num = %hu, dif = %d\n",
+ isk->inet_num,
+ sk->sk_bound_dev_if);
err = 0;
if (sk->sk_family == AF_INET && isk->inet_rcv_saddr)
--
1.9.1
^ permalink raw reply related
* Re: fq_codel and skb->hash
From: Eric Dumazet @ 2017-01-17 2:34 UTC (permalink / raw)
To: Andrew Collins; +Cc: netdev, edumazet
In-Reply-To: <1484617489.13165.63.camel@edumazet-glaptop3.roam.corp.google.com>
On Mon, 2017-01-16 at 17:44 -0800, Eric Dumazet wrote:
> On Mon, 2017-01-16 at 17:04 -0700, Andrew Collins wrote:
> > Is there a better way to manage flow separation in routed+encapsulated traffic?
>
> Encapsulated traffic is fine, since flow dissector skips encap header(s)
> up to the L4 header.
>
> Problem is about encrypted traffic, since presumably this L4 header is
> opaque for flow dissector ;)
BTW, how can we make sure skb->hash is populated before IPSEC ?
Relying on forwarding, and skb->hash set by a device might be not
enough.
^ permalink raw reply
* [GIT] Networking
From: David Miller @ 2017-01-17 2:52 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
1) Handle multicast packets properly in fast-RX path of mac80211,
from Johannes Berg.
2) Because of a logic bug, the user can't actually force SW
checksumming on r8152 devices. This makes diagnosis of hw
checksumming bugs really annoying. Fix from Hayes Wang.
3) VXLAN route lookup does not take the source and destination ports
into account, which means IPSEC policies cannot be matched
properly. Fix from Martynas Pumputis.
4) Do proper RCU locking in netvsc callbacks, from Stephen Hemminger.
5) Fix SKB leaks in mlxsw driver, from Arkadi Sharshevsky.
6) If lwtunnel_fill_encap() fails, we do not abort the netlink message
construction properly in fib_dump_info(), from David Ahern.
7) Do not use kernel stack for DMA buffers in atusb driver, from
Stefan Schmidt.
8) Openvswitch conntack actions need to maintain a correct checksum,
fix from Lance Richardson.
9) ax25_disconnect() is missing a check for ax25->sk being NULL, in fact
it already checks this, but not in all of the necessary spots. Fix
from Basil Gunn.
10) Action GET operations in the packet scheduler can erroneously bump
the reference count of the entry, making it unreleasable. Fix
from Jamal Hadi Salim. Jamal gives a great set of example command
lines that trigger this in the commit message.
Please pull, thanks a lot!
The following changes since commit ba836a6f5ab1243ff5e08a941a2d1de8b31244e1:
Merge branch 'akpm' (patches from Andrew) (2017-01-11 11:15:15 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
for you to fetch changes up to 0faa9cb5b3836a979864a6357e01d2046884ad52:
net sched actions: fix refcnt when GETing of action after bind (2017-01-16 19:43:19 -0500)
----------------------------------------------------------------
Andrey Smirnov (1):
at86rf230: Allow slow GPIO pins for "rstn"
Arkadi Sharshevsky (2):
mlxsw: spectrum: Fix memory leak at skb reallocation
mlxsw: switchx2: Fix memory leak at skb reallocation
Arnd Bergmann (2):
cpmac: remove hopeless #warning
net/mlx5e: Fix a -Wmaybe-uninitialized warning
Basil Gunn (1):
ax25: Fix segfault after sock connection timeout
Beni Lev (1):
cfg80211: consider VHT opmode on station update
Cedric Izoard (1):
mac80211: Fix headroom allocation when forwarding mesh pkt
Daniel Borkmann (1):
bpf: rework prog_digest into prog_tag
David Ahern (2):
net: lwtunnel: Handle lwtunnel_fill_encap failure
net: ipv4: fix table id in getroute response
David Lebrun (1):
ipv6: sr: fix several BUGs when preemption is enabled
David S. Miller (4):
Merge branch 'mlxsw-fixes'
Merge tag 'mac80211-for-davem-2017-01-13' of git://git.kernel.org/.../jberg/mac80211
Merge branch 'for-upstream' of git://git.kernel.org/.../bluetooth/bluetooth
Merge branch 'mlx4-core-fixes'
Elad Raz (1):
mlxsw: pci: Fix EQE structure definition
Emmanuel Grumbach (1):
mac80211: fix the TID on NDPs sent as EOSP carrier
Eric Dumazet (1):
mlx4: do not call napi_schedule() without care
Felix Fietkau (1):
mac80211: initialize SMPS field in HT capabilities
Florian Fainelli (1):
net: systemport: Decouple flow control from __bcm_sysport_tx_reclaim
Hangbin Liu (1):
mld: do not remove mld souce list info when set link down
Heiner Kallweit (1):
net: stmmac: don't use netdev_[dbg, info, ..] before net_device is registered
Ivan Vecera (3):
be2net: fix status check in be_cmd_pmac_add()
be2net: don't delete MAC on close on unprivileged BE3 VFs
be2net: fix MAC addr setting on privileged BE3 VFs
Jack Morgenstein (3):
net/mlx4_core: Fix racy CQ (Completion Queue) free
net/mlx4_core: Fix when to save some qp context flags for dynamic VST to VGT transitions
net/mlx4_core: Eliminate warning messages for SRQ_LIMIT under SRIOV
Jakub Sitnicki (1):
ip6_tunnel: Account for tunnel header in tunnel MTU
Jamal Hadi Salim (1):
net sched actions: fix refcnt when GETing of action after bind
Johannes Berg (3):
mac80211: implement multicast forwarding on fast-RX path
mac80211: calculate min channel width correctly
mac80211: recalculate min channel width on VHT opmode changes
Karicheri, Muralidharan (1):
net: phy: dp83867: allow RGMII_TXID/RGMII_RXID interface types
Kazuya Mizuguchi (1):
ravb: Remove Rx overflow log messages
Lance Richardson (1):
openvswitch: maintain correct checksum state in conntrack actions
Martynas Pumputis (1):
vxlan: Set ports in flow key when doing route lookups
Masaru Nagai (1):
ravb: do not use zero-length alignment DMA descriptor
Michal Kazior (1):
mac80211: prevent skb/txq mismatch
Parthasarathy Bhuvaragan (1):
tipc: allocate user memory with GFP_KERNEL flag
Shannon Nelson (1):
tcp: fix tcp_fastopen unaligned access complaints on sparc
Stefan Schmidt (4):
ieee802154: atusb: do not use the stack for buffers to make them DMA able
ieee802154: atusb: make sure we set a randaom extended address if fetching fails
ieee802154: atusb: do not use the stack for address fetching to make it DMA able
ieee802154: atusb: fix driver to work with older firmware versions
Timur Tabi (1):
net: qcom/emac: grab a reference to the phydev on ACPI systems
Vadim Lomovtsev (1):
net: thunderx: acpi: fix LMAC initialization
hayeswang (1):
r8152: fix the sw rx checksum is unavailable
stephen hemminger (1):
netvsc: add rcu_read locking to netvsc callback
Documentation/devicetree/bindings/net/ti,dp83867.txt | 6 ++++--
drivers/net/ethernet/broadcom/bcmsysport.c | 25 ++++++++++++++++++-------
drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 11 ++++++-----
drivers/net/ethernet/emulex/benet/be_cmds.c | 2 +-
drivers/net/ethernet/emulex/benet/be_main.c | 18 +++++++++++++++---
drivers/net/ethernet/mellanox/mlx4/cq.c | 38 ++++++++++++++++++++------------------
drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 5 ++++-
drivers/net/ethernet/mellanox/mlx4/eq.c | 23 ++++++++++++++---------
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 5 +++--
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 11 +++++++----
drivers/net/ethernet/mellanox/mlxsw/pci_hw.h | 8 ++++----
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 +
drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 1 +
drivers/net/ethernet/qualcomm/emac/emac-phy.c | 7 +++++++
drivers/net/ethernet/qualcomm/emac/emac.c | 6 ++----
drivers/net/ethernet/renesas/ravb_main.c | 21 +++++++++++++++------
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 19 ++++++++++---------
drivers/net/ethernet/ti/cpmac.c | 2 +-
drivers/net/hyperv/netvsc_drv.c | 3 +++
drivers/net/ieee802154/at86rf230.c | 4 ++--
drivers/net/ieee802154/atusb.c | 59 +++++++++++++++++++++++++++++++++++++++++++----------------
drivers/net/phy/dp83867.c | 8 ++++++--
drivers/net/usb/r8152.c | 7 ++++++-
drivers/net/vxlan.c | 13 ++++++++++---
include/linux/bpf.h | 2 +-
include/linux/filter.h | 6 ++++--
include/linux/tcp.h | 7 ++++++-
include/uapi/linux/nl80211.h | 4 +++-
include/uapi/linux/pkt_cls.h | 2 +-
include/uapi/linux/tc_act/tc_bpf.h | 2 +-
kernel/bpf/core.c | 14 ++++++++------
kernel/bpf/syscall.c | 8 ++++----
kernel/bpf/verifier.c | 2 +-
net/ax25/ax25_subr.c | 2 +-
net/ipv4/fib_semantics.c | 11 +++++++----
net/ipv4/route.c | 2 +-
net/ipv4/tcp_fastopen.c | 2 +-
net/ipv6/ip6_tunnel.c | 4 ++--
net/ipv6/mcast.c | 51 ++++++++++++++++++++++++++++++---------------------
net/ipv6/route.c | 3 ++-
net/ipv6/seg6_hmac.c | 2 +-
net/ipv6/seg6_iptunnel.c | 4 ++++
net/mac80211/chan.c | 3 ---
net/mac80211/iface.c | 21 +++++++++++++++++++++
net/mac80211/main.c | 13 +++++++++----
net/mac80211/rate.c | 2 ++
net/mac80211/rx.c | 38 +++++++++++++++++++++-----------------
net/mac80211/sta_info.c | 4 ++--
net/mac80211/tx.c | 17 +++++++----------
net/mac80211/vht.c | 4 +++-
net/openvswitch/conntrack.c | 6 ++++--
net/sched/act_api.c | 5 ++---
net/sched/act_bpf.c | 5 ++---
net/sched/cls_bpf.c | 4 ++--
net/tipc/discover.c | 4 ++--
net/tipc/link.c | 2 +-
net/tipc/msg.c | 16 ++++++++--------
net/tipc/msg.h | 2 +-
net/tipc/name_distr.c | 2 +-
net/wireless/nl80211.c | 15 +++++++++++++++
60 files changed, 384 insertions(+), 210 deletions(-)
^ permalink raw reply
* Re: [PATCH] stmicro: rename it to dwc to improve future development
From: kbuild test robot @ 2017-01-17 3:13 UTC (permalink / raw)
To: Joao Pinto
Cc: kbuild-all, davem, peppe.cavallaro, alexandre.torgue, netdev,
Joao Pinto
In-Reply-To: <0f5b325a9c8d9e5b6c95f90d833278cfb8f77606.1484571696.git.jpinto@synopsys.com>
[-- Attachment #1: Type: text/plain, Size: 22736 bytes --]
Hi Joao,
[auto build test WARNING on net-next/master]
[also build test WARNING on next-20170116]
[cannot apply to v4.10-rc4]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Joao-Pinto/stmicro-rename-it-to-dwc-to-improve-future-development/20170116-214440
config: m32r-allyesconfig (attached as .config)
compiler: m32r-linux-gcc (GCC) 6.2.0
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=m32r
All warnings (new ones prefixed by >>):
In file included from include/linux/printk.h:6:0,
from include/linux/kernel.h:13,
from include/asm-generic/bug.h:13,
from arch/m32r/include/asm/bug.h:3,
from include/linux/bug.h:4,
from include/linux/mmdebug.h:4,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from drivers/net/ethernet/dwc/stmmac/dwmac1000_core.c:30:
drivers/net/ethernet/dwc/stmmac/dwmac1000_core.c: In function 'dwmac1000_dump_regs':
include/linux/kern_levels.h:4:18: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:13:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:299:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
>> drivers/net/ethernet/dwc/stmmac/dwmac1000_core.c:107:3: note: in expansion of macro 'pr_info'
pr_info("\tReg No. %d (offset 0x%x): 0x%08x\n", i,
^~~~~~~
--
In file included from include/linux/printk.h:6:0,
from include/linux/kernel.h:13,
from include/linux/list.h:8,
from include/linux/preempt.h:10,
from include/linux/spinlock.h:50,
from include/linux/phy.h:20,
from drivers/net/ethernet/dwc/stmmac/dwmac1000.h:25,
from drivers/net/ethernet/dwc/stmmac/dwmac1000_dma.c:30:
drivers/net/ethernet/dwc/stmmac/dwmac1000_dma.c: In function 'dwmac1000_dump_dma_regs':
include/linux/kern_levels.h:4:18: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
#define KERN_ERR KERN_SOH "3" /* error conditions */
^~~~~~~~
include/linux/printk.h:292:9: note: in expansion of macro 'KERN_ERR'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~
>> drivers/net/ethernet/dwc/stmmac/dwmac1000_dma.c:215:4: note: in expansion of macro 'pr_err'
pr_err("\t Reg No. %d (offset 0x%x): 0x%08x\n", i,
^~~~~~
--
In file included from include/linux/printk.h:6:0,
from include/linux/kernel.h:13,
from include/linux/list.h:8,
from include/linux/preempt.h:10,
from include/linux/spinlock.h:50,
from include/linux/phy.h:20,
from drivers/net/ethernet/dwc/stmmac/dwmac100.h:28,
from drivers/net/ethernet/dwc/stmmac/dwmac100_core.c:33:
drivers/net/ethernet/dwc/stmmac/dwmac100_core.c: In function 'dwmac100_dump_mac_regs':
include/linux/kern_levels.h:4:18: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:13:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:299:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
>> drivers/net/ethernet/dwc/stmmac/dwmac100_core.c:53:2: note: in expansion of macro 'pr_info'
pr_info("\tcontrol reg (offset 0x%x): 0x%08x\n", MAC_CONTROL,
^~~~~~~
include/linux/kern_levels.h:4:18: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:13:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:299:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac100_core.c:55:2: note: in expansion of macro 'pr_info'
pr_info("\taddr HI (offset 0x%x): 0x%08x\n ", MAC_ADDR_HIGH,
^~~~~~~
include/linux/kern_levels.h:4:18: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:13:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:299:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac100_core.c:57:2: note: in expansion of macro 'pr_info'
pr_info("\taddr LO (offset 0x%x): 0x%08x\n", MAC_ADDR_LOW,
^~~~~~~
include/linux/kern_levels.h:4:18: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:13:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:299:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac100_core.c:59:2: note: in expansion of macro 'pr_info'
pr_info("\tmulticast hash HI (offset 0x%x): 0x%08x\n",
^~~~~~~
include/linux/kern_levels.h:4:18: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:13:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:299:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac100_core.c:61:2: note: in expansion of macro 'pr_info'
pr_info("\tmulticast hash LO (offset 0x%x): 0x%08x\n",
^~~~~~~
include/linux/kern_levels.h:4:18: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:13:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:299:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac100_core.c:63:2: note: in expansion of macro 'pr_info'
pr_info("\tflow control (offset 0x%x): 0x%08x\n",
^~~~~~~
include/linux/kern_levels.h:4:18: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:13:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:299:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac100_core.c:65:2: note: in expansion of macro 'pr_info'
pr_info("\tVLAN1 tag (offset 0x%x): 0x%08x\n", MAC_VLAN1,
^~~~~~~
include/linux/kern_levels.h:4:18: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:13:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:299:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac100_core.c:67:2: note: in expansion of macro 'pr_info'
pr_info("\tVLAN2 tag (offset 0x%x): 0x%08x\n", MAC_VLAN2,
^~~~~~~
--
In file included from include/linux/kernel.h:13:0,
from include/linux/list.h:8,
from include/linux/preempt.h:10,
from include/linux/spinlock.h:50,
from include/linux/phy.h:20,
from drivers/net/ethernet/dwc/stmmac/dwmac100.h:28,
from drivers/net/ethernet/dwc/stmmac/dwmac100_dma.c:32:
drivers/net/ethernet/dwc/stmmac/dwmac100_dma.c: In function 'dwmac100_dump_dma_regs':
>> drivers/net/ethernet/dwc/stmmac/dwmac100_dma.c:79:12: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'long unsigned int' [-Wformat=]
pr_debug("\t CSR%d (offset 0x%x): 0x%08x\n", i,
^
include/linux/printk.h:276:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
include/linux/printk.h:324:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~
>> drivers/net/ethernet/dwc/stmmac/dwmac100_dma.c:79:3: note: in expansion of macro 'pr_debug'
pr_debug("\t CSR%d (offset 0x%x): 0x%08x\n", i,
^~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac100_dma.c:83:11: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
pr_debug("\tCSR20 (0x%x): 0x%08x, CSR21 (0x%x): 0x%08x\n",
^
include/linux/printk.h:276:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
include/linux/printk.h:324:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac100_dma.c:83:2: note: in expansion of macro 'pr_debug'
pr_debug("\tCSR20 (0x%x): 0x%08x, CSR21 (0x%x): 0x%08x\n",
^~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac100_dma.c:83:11: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'long unsigned int' [-Wformat=]
pr_debug("\tCSR20 (0x%x): 0x%08x, CSR21 (0x%x): 0x%08x\n",
^
include/linux/printk.h:276:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
include/linux/printk.h:324:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac100_dma.c:83:2: note: in expansion of macro 'pr_debug'
pr_debug("\tCSR20 (0x%x): 0x%08x, CSR21 (0x%x): 0x%08x\n",
^~~~~~~~
--
In file included from include/linux/kernel.h:13:0,
from include/asm-generic/bug.h:13,
from arch/m32r/include/asm/bug.h:3,
from include/linux/bug.h:4,
from include/linux/io.h:23,
from drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:16:
drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c: In function '_dwmac4_dump_dma_regs':
>> drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:133:11: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
pr_debug("\tDMA_CHAN_CONTROL, offset: 0x%x, val: 0x%x\n", 0,
^
include/linux/printk.h:276:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
include/linux/printk.h:324:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~
>> drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:133:2: note: in expansion of macro 'pr_debug'
pr_debug("\tDMA_CHAN_CONTROL, offset: 0x%x, val: 0x%x\n", 0,
^~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:135:11: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
pr_debug("\tDMA_CHAN_TX_CONTROL, offset: 0x%x, val: 0x%x\n", 0x4,
^
include/linux/printk.h:276:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
include/linux/printk.h:324:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:135:2: note: in expansion of macro 'pr_debug'
pr_debug("\tDMA_CHAN_TX_CONTROL, offset: 0x%x, val: 0x%x\n", 0x4,
^~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:137:11: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
pr_debug("\tDMA_CHAN_RX_CONTROL, offset: 0x%x, val: 0x%x\n", 0x8,
^
include/linux/printk.h:276:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
include/linux/printk.h:324:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:137:2: note: in expansion of macro 'pr_debug'
pr_debug("\tDMA_CHAN_RX_CONTROL, offset: 0x%x, val: 0x%x\n", 0x8,
^~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:139:11: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
pr_debug("\tDMA_CHAN_TX_BASE_ADDR, offset: 0x%x, val: 0x%x\n", 0x14,
^
include/linux/printk.h:276:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
include/linux/printk.h:324:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:139:2: note: in expansion of macro 'pr_debug'
pr_debug("\tDMA_CHAN_TX_BASE_ADDR, offset: 0x%x, val: 0x%x\n", 0x14,
^~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:141:11: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
pr_debug("\tDMA_CHAN_RX_BASE_ADDR, offset: 0x%x, val: 0x%x\n", 0x1c,
^
include/linux/printk.h:276:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
include/linux/printk.h:324:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:141:2: note: in expansion of macro 'pr_debug'
pr_debug("\tDMA_CHAN_RX_BASE_ADDR, offset: 0x%x, val: 0x%x\n", 0x1c,
^~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:143:11: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
pr_debug("\tDMA_CHAN_TX_END_ADDR, offset: 0x%x, val: 0x%x\n", 0x20,
^
include/linux/printk.h:276:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
include/linux/printk.h:324:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:143:2: note: in expansion of macro 'pr_debug'
pr_debug("\tDMA_CHAN_TX_END_ADDR, offset: 0x%x, val: 0x%x\n", 0x20,
^~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:145:11: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
pr_debug("\tDMA_CHAN_RX_END_ADDR, offset: 0x%x, val: 0x%x\n", 0x28,
^
include/linux/printk.h:276:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
include/linux/printk.h:324:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:145:2: note: in expansion of macro 'pr_debug'
pr_debug("\tDMA_CHAN_RX_END_ADDR, offset: 0x%x, val: 0x%x\n", 0x28,
^~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:147:11: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
pr_debug("\tDMA_CHAN_TX_RING_LEN, offset: 0x%x, val: 0x%x\n", 0x2c,
^
include/linux/printk.h:276:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
include/linux/printk.h:324:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:147:2: note: in expansion of macro 'pr_debug'
pr_debug("\tDMA_CHAN_TX_RING_LEN, offset: 0x%x, val: 0x%x\n", 0x2c,
^~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:149:11: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
pr_debug("\tDMA_CHAN_RX_RING_LEN, offset: 0x%x, val: 0x%x\n", 0x30,
^
include/linux/printk.h:276:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
include/linux/printk.h:324:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:149:2: note: in expansion of macro 'pr_debug'
pr_debug("\tDMA_CHAN_RX_RING_LEN, offset: 0x%x, val: 0x%x\n", 0x30,
^~~~~~~~
drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c:151:11: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
pr_debug("\tDMA_CHAN_INTR_ENA, offset: 0x%x, val: 0x%x\n", 0x34,
..
vim +/pr_info +107 drivers/net/ethernet/dwc/stmmac/dwmac1000_core.c
d2afb5bd drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2014-09-01 91
ebbb293f drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-09-17 92 writel(value, ioaddr + GMAC_CONTROL);
ebbb293f drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-09-17 93
ebbb293f drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-09-17 94 value = readl(ioaddr + GMAC_CONTROL);
ebbb293f drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-09-17 95
ebbb293f drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-09-17 96 return !!(value & GMAC_CONTROL_IPC);
ebbb293f drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-09-17 97 }
ebbb293f drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-09-17 98
7ed24bbe drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c Vince Bridgers 2014-07-31 99 static void dwmac1000_dump_regs(struct mac_device_info *hw)
21d437cc drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-01-06 100 {
7ed24bbe drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c Vince Bridgers 2014-07-31 101 void __iomem *ioaddr = hw->pcsr;
21d437cc drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-01-06 102 int i;
1f0f6388 drivers/net/stmmac/dwmac1000_core.c David S. Miller 2010-08-30 103 pr_info("\tDWMAC1000 regs (base addr = 0x%p)\n", ioaddr);
21d437cc drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-01-06 104
21d437cc drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-01-06 105 for (i = 0; i < 55; i++) {
21d437cc drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-01-06 106 int offset = i * 4;
21d437cc drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-01-06 @107 pr_info("\tReg No. %d (offset 0x%x): 0x%08x\n", i,
21d437cc drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-01-06 108 offset, readl(ioaddr + offset));
21d437cc drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-01-06 109 }
21d437cc drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-01-06 110 }
21d437cc drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-01-06 111
7ed24bbe drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c Vince Bridgers 2014-07-31 112 static void dwmac1000_set_umac_addr(struct mac_device_info *hw,
7ed24bbe drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c Vince Bridgers 2014-07-31 113 unsigned char *addr,
21d437cc drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-01-06 114 unsigned int reg_n)
21d437cc drivers/net/stmmac/dwmac1000_core.c Giuseppe CAVALLARO 2010-01-06 115 {
:::::: The code at line 107 was first introduced by commit
:::::: 21d437cc66dcfd0119a4905214fbbe19f3e276dc stmmac: rename the gmac as dwmac1000 and split core and dma parts
:::::: TO: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 40611 bytes --]
^ permalink raw reply
* Re: [PATCH] qed: Replace memset with eth_zero_addr
From: Shyam Saini @ 2017-01-17 3:33 UTC (permalink / raw)
To: David Miller; +Cc: Yuval.Mintz, Ariel.Elior, everest-linux-l2, netdev
In-Reply-To: <20170116.145819.115892553691222296.davem@davemloft.net>
On Mon, Jan 16, 2017 at 02:58:19PM -0500, David Miller wrote:
> From: Shyam Saini <mayhs11saini@gmail.com>
> Date: Tue, 17 Jan 2017 00:21:38 +0530
>
> > Use eth_zero_addr to assign zero address to the given address array
> > instead of memset when the second argument in memset is address
> > of zero. Also, it makes the code clearer
> >
> > Signed-off-by: Shyam Saini <mayhs11saini@gmail.com>
>
> This patch does not apply cleanly to the net-next tree.
I always send patches from linux-next tree and that caused this mistake
I apologize for this.
> Please state if you don't understand what that means instead of
> submitting this patch over and over again against the wrong source
> tree.
Now sent from net-next tree
Thanks a lot,
Shyam
^ permalink raw reply
* Re: [PATCHv3 net-next 1/7] sctp: add a common helper function to generate stream reconf chunk
From: Xin Long @ 2017-01-17 3:41 UTC (permalink / raw)
To: David Miller
Cc: network dev, linux-sctp, Marcelo Ricardo Leitner, Neil Horman,
Vlad Yasevich
In-Reply-To: <20170116.135033.773805315875747960.davem@davemloft.net>
On Tue, Jan 17, 2017 at 2:50 AM, David Miller <davem@davemloft.net> wrote:
> From: Xin Long <lucien.xin@gmail.com>
> Date: Sat, 14 Jan 2017 03:15:35 +0800
>
>> diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
>> index a15d824..fd58097 100644
>> --- a/net/sctp/sm_make_chunk.c
>> +++ b/net/sctp/sm_make_chunk.c
>> @@ -3526,3 +3526,36 @@ struct sctp_chunk *sctp_make_fwdtsn(const struct sctp_association *asoc,
>>
>> return retval;
>> }
>> +
>> +/* RE-CONFIG 3.1 (RE-CONFIG chunk)
>> + * 0 1 2 3
>> + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
>> + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> + * | Type = 130 | Chunk Flags | Chunk Length |
>> + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> + * \ \
>> + * / Re-configuration Parameter /
>> + * \ \
>> + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> + * \ \
>> + * / Re-configuration Parameter (optional) /
>> + * \ \
>> + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> + */
>> +static struct sctp_chunk *sctp_make_reconf(
>> + const struct sctp_association *asoc,
>> + int length)
>> +{
>> + struct sctp_reconf_chunk *reconf;
>
> This patch will cause a warning because this new static function is unused.
>
> All patch series must be fully bisectable, that measn at each step of
> the patch series the tree must work properly and not introduce new
> build warnings or build failures.
sorry, will merge patch 1/7 and 2/7
^ permalink raw reply
* Re: [PATCH V2] audit: log 32-bit socketcalls
From: Richard Guy Briggs @ 2017-01-17 3:53 UTC (permalink / raw)
To: Paul Moore; +Cc: netdev, Steve, linux-audit, linux-kernel
In-Reply-To: <CAHC9VhQsL7c=dAd4ZyTbEugkcrNuaxGNnaOi8oMkn=NCwuVoHA@mail.gmail.com>
On 2017-01-16 15:04, Paul Moore wrote:
> On Fri, Jan 13, 2017 at 9:42 AM, Eric Paris <eparis@redhat.com> wrote:
> > On Fri, 2017-01-13 at 04:51 -0500, Richard Guy Briggs wrote:
> >> diff --git a/include/linux/audit.h b/include/linux/audit.h
> >> index 9d4443f..43d8003 100644
> >> --- a/include/linux/audit.h
> >> +++ b/include/linux/audit.h
> >> @@ -387,6 +387,18 @@ static inline int audit_socketcall(int nargs,
> >> unsigned long *args)
> >> return __audit_socketcall(nargs, args);
> >> return 0;
> >> }
> >> +static inline int audit_socketcall_compat(int nargs, u32 *args)
> >> +{
> >> + if (unlikely(!audit_dummy_context())) {
> >
> > I've always hated these likely/unlikely. Mostly because I think they
> > are so often wrong. I believe this says that you compiled audit in but
> > you expect it to be explicitly disabled. While that is (recently) true
> > in Fedora I highly doubt that's true on the vast majority of systems
> > that have audit compiled in.
>
> Richard and I have talked about the likely/unlikely optimization
> before and I know Richard likes to use them, but I don't for the
> reasons Eric has already mentioned. Richard, since you're respinning
> the patch, go ahead and yank out the unlikely() call.
I don't "like to use them". I'm simply following the use and style of
existing code and the arguments of others in places of critical
performance. If I "fix" that one, then I would feel compelled to yank
out the one in the function immediately above, audit_socketcall() for
consistency to ease my conscience. Eric conceded that argument.
> paul moore
- RGB
--
Richard Guy Briggs <rgb@redhat.com>
Kernel Security Engineering, Base Operating Systems, Red Hat
Remote, Ottawa, Canada
Voice: +1.647.777.2635, Internal: (81) 32635
^ permalink raw reply
* Re: [PATCH V2] audit: log 32-bit socketcalls
From: Richard Guy Briggs @ 2017-01-17 4:03 UTC (permalink / raw)
To: David Miller
Cc: netdev, linux-kernel, linux-audit, aixer77, eparis, pmoore,
sgrubb
In-Reply-To: <20170116.132745.1831536278596554491.davem@davemloft.net>
On 2017-01-16 13:27, David Miller wrote:
> From: Richard Guy Briggs <rgb@redhat.com>
> Date: Fri, 13 Jan 2017 04:51:48 -0500
>
> > diff --git a/include/linux/audit.h b/include/linux/audit.h
> > index 9d4443f..43d8003 100644
> > --- a/include/linux/audit.h
> > +++ b/include/linux/audit.h
> > @@ -387,6 +387,18 @@ static inline int audit_socketcall(int nargs, unsigned long *args)
> > return __audit_socketcall(nargs, args);
> > return 0;
> > }
> > +static inline int audit_socketcall_compat(int nargs, u32 *args)
> > +{
>
> Please put an empty line between function definitions.
Ok, should I reformat the rest of the file while I'm at it?
> > + if (unlikely(!audit_dummy_context())) {
> > + int i;
> > + unsigned long a[AUDITSC_ARGS];
>
> Please order local variable declarations from longest to shortest line.
Ok. Is this a recent addition to a style guide or in checkpatch.pl?
> > +
> > + for (i=0; i<nargs; i++)
>
> Please put a space around operators such as "=" and "<".
Oops, my bad...
> > + a[i] = (unsigned long)args[i];
> > + return __audit_socketcall(nargs, a);
> > + }
> > + return 0;
> > +}
> > static inline int audit_sockaddr(int len, void *addr)
>
> Again, empty line between function definitions please.
>
> > @@ -781,14 +782,24 @@ COMPAT_SYSCALL_DEFINE5(recvmmsg, int, fd, struct compat_mmsghdr __user *, mmsg,
> >
> > COMPAT_SYSCALL_DEFINE2(socketcall, int, call, u32 __user *, args)
> > {
> > + unsigned int len;
> > int ret;
> > - u32 a[6];
> > + u32 a[AUDITSC_ARGS];
> > u32 a0, a1;
>
> Longest to shortest line for local variable declarations please.
- RGB
--
Richard Guy Briggs <rgb@redhat.com>
Kernel Security Engineering, Base Operating Systems, Red Hat
Remote, Ottawa, Canada
Voice: +1.647.777.2635, Internal: (81) 32635
^ permalink raw reply
* Re: [PATCHv3 net-next 2/7] sctp: add support for generating stream reconf ssn reset request chunk
From: Xin Long @ 2017-01-17 4:27 UTC (permalink / raw)
To: Marcelo Ricardo Leitner
Cc: network dev, linux-sctp, Neil Horman, Vlad Yasevich, davem
In-Reply-To: <CADvbK_cLGNyCWCHJ1pcMxxuqFvGABKBOS36_ekJhYsrd30nc3g@mail.gmail.com>
On Mon, Jan 16, 2017 at 11:56 AM, Xin Long <lucien.xin@gmail.com> wrote:
> On Sun, Jan 15, 2017 at 11:51 PM, Marcelo Ricardo Leitner
> <marcelo.leitner@gmail.com> wrote:
>> On Sat, Jan 14, 2017 at 03:15:36AM +0800, Xin Long wrote:
>>> This patch is to add asoc strreset_outseq and strreset_inseq for
>>> saving the reconf request sequence, initialize them when create
>>> assoc and process init, and also to define Incoming and Outgoing
>>> SSN Reset Request Parameter described in rfc6525 section 4.1 and
>>> 4.2, As they can be in one same chunk as section rfc6525 3.1-3
>>> describes, it makes them in one function.
>>>
>>> Signed-off-by: Xin Long <lucien.xin@gmail.com>
>>> ---
>>> include/linux/sctp.h | 26 ++++++++++++++
>>> include/net/sctp/sm.h | 5 ++-
>>> include/net/sctp/structs.h | 3 ++
>>> net/sctp/associola.c | 1 +
>>> net/sctp/sm_make_chunk.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++
>>> 5 files changed, 122 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/include/linux/sctp.h b/include/linux/sctp.h
>>> index cdc3b05..d5da19c 100644
>>> --- a/include/linux/sctp.h
>>> +++ b/include/linux/sctp.h
>>> @@ -200,6 +200,13 @@ typedef enum {
>>> SCTP_PARAM_SUCCESS_REPORT = cpu_to_be16(0xc005),
>>> SCTP_PARAM_ADAPTATION_LAYER_IND = cpu_to_be16(0xc006),
>>>
>>> + /* RE-CONFIG. Section 4 */
>>> + SCTP_PARAM_RESET_OUT_REQUEST = cpu_to_be16(0x000d),
>>> + SCTP_PARAM_RESET_IN_REQUEST = cpu_to_be16(0x000e),
>>> + SCTP_PARAM_RESET_TSN_REQUEST = cpu_to_be16(0x000f),
>>> + SCTP_PARAM_RESET_RESPONSE = cpu_to_be16(0x0010),
>>> + SCTP_PARAM_RESET_ADD_OUT_STREAMS = cpu_to_be16(0x0011),
>>> + SCTP_PARAM_RESET_ADD_IN_STREAMS = cpu_to_be16(0x0012),
>>> } sctp_param_t; /* enum */
>>>
>>>
>>> @@ -716,4 +723,23 @@ struct sctp_reconf_chunk {
>>> __u8 params[0];
>>> } __packed;
>>>
>>> +struct sctp_strreset_req {
>>> + sctp_paramhdr_t param_hdr;
>>> + __u32 request_seq;
>>> +} __packed;
>>> +
>>> +struct sctp_strreset_outreq {
>>> + sctp_paramhdr_t param_hdr;
>>> + __u32 request_seq;
>>
>> This should be:
>> + struct sctp_strreset_req strreset_req;
>> Use the definition you created above for the encapsulation and make the
>> embedding evident.
>> Like it's done for sctp_chunkhdr_t.
> I'm not sure if it's good to do it like sctp_chunkhdr_t.
>
> As sctp_chunkhdr is a very common data:
> Chunk Type | Chunk Flags | Chunk Length
> and the next must be "Chunk Value"
>
> But here sctp_strreset_req is more used to access
> the request_seq of the params in asoc->strreset_chunk
> without knowing params' type. like in sctp_chunk_lookup_strreset_param()
> and sctp_process_strreset_resp() [see it from the big patchset].
>
> struct sctp_strreset_outreq {
> sctp_paramhdr_t param_hdr;
> __u32 request_seq;
> ------------------------------------[1]
> __u32 response_seq;
> __u32 send_reset_at_tsn;
> __u16 list_of_streams[0];
> } __packed;
>
> it seems not good to split it by [1].
> __u32 request_seq;
> __u32 response_seq;
> __u32 send_reset_at_tsn;
> __u16 list_of_streams[0];
> these should to together and equal.
>
> what do you think ?
>
Hi, Marcelo, I'm planning to drop "struct sctp_strreset_req" so
that it will not be confusing here, and only introduce it when
it's used somewhere. agreed ?
^ permalink raw reply
* (unknown),
From: Andy Lutomirski @ 2017-01-17 5:18 UTC (permalink / raw)
To: Tejun Heo
Cc: Michal Hocko, Peter Zijlstra, David Ahern, Alexei Starovoitov,
Andy Lutomirski, Daniel Mack, Mickaël Salaün, Kees Cook,
Jann Horn, David S. Miller, Thomas Graf, Michael Kerrisk,
Linux API, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Network Development
;; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with C-x C-f and enter text in its buffer.
On Sun, Jan 15, 2017 at 5:19 PM, Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> Hello,
>
> Sorry about the delay. Some fire fighthing followed the holidays.
>
> On Tue, Jan 03, 2017 at 11:25:59AM +0100, Michal Hocko wrote:
>> > So from what I understand the proposed cgroup is not in fact
>> > hierarchical at all.
>> >
>> > @TJ, I thought you were enforcing all new cgroups to be properly
>> > hierarchical, that would very much include this one.
>>
>> I would be interested in that as well. We have made that mistake in
>> memcg v1 where hierarchy could be disabled for performance reasons and
>> that turned out to be major PITA in the end. Why do we want to repeat
>> the same mistake here?
>
> Across the different threads on this subject, there have been multiple
> explanations but I'll try to sum it up more clearly.
>
> The big issue here is whether this is a cgroup thing or a bpf thing.
> I don't think there's anything inherently wrong with one approach or
> the other. Forget about the proposed cgroup bpf extentions but thinkg
> about how iptables does cgroups. Whether it's the netcls/netprio in
> v1 or direct membership matching in v2, it is the network side testing
> for cgroup membership one way or the other. The only part where
> cgroup is involved in is answering that test.
>
[...]
>
> None of the issues that people have been raising here is actually an
> issue if one thinks of it as a part of bpf. Its security model is
> exactly the same as any other bpf programs. Recursive behavior is
> exactly the same as how other external cgroup descendant membership
> testing work. There is no issue here whatsoever.
After sleeping on this, here are my thoughts:
First, there are three ways to think about this, not just two. It
could be a BPF feature, a net feature, or a cgroup feature.
I think that calling it a BPF feature is a cop-out. BPF is an
assembly language and a mechanism for importing little programs into
the kernel. BPF maps are a BPF feature. These new hooks are a
feature that actively changes the behavior of other parts of the
kernel. I don't see how calling this new feature a "BPF" feature
excuses it from playing by the expected rules of the subsystems it
affects or from generally working well with the rest of the kernel.
Perhaps this is a net feature, though, not a cgroup feature. This
would IMO make a certain amount of sense. Iptables cgroup matches,
for example, logically are an iptables (i.e., net) feature. The
problem here is that network configuration (and this explicitly
includes iptables) is done on a per-netns level, whereas these new
hooks entirely ignore network namespaces. I've pointed out that
trying to enable them in a namespaced world is problematic (e.g.
switching to ns_capable() will cause serious problems), and Alexei
seems to think that this will never happen. So I don't think we can
really call this a net feature that works the way that other net
features work.
(Suppose that this actually tried to be netns-enabled. Then you'd
have to map from (netns, cgroup) -> hook, and this would probably be
slow and messy.)
So I think that leaves it being a cgroup feature. And it definitely
does *not* play by the rules of cgroups right now.
> I'm sure we'll
> eventually get there but from what I hear it isn't something we can
> pull off in a restricted timeframe.
To me, this sounds like "the API isn't that great, we know how to do
better, but we really really want this feature ASAP so we want to ship
it with a sub-par API." I think that's a bad idea.
> This also holds true for the perf controller. While it is implemented
> as a controller, it isn't visible to cgroup users in any way and the
> only function it serves is providing the membership test to perf
> subsystem. perf is the one which decides whether and how it is to be
> used. cgroup providing membership test to other subsystems is
> completely acceptable and established.
Unless I'm mistaken, "perf_event" is an actual cgroup controller, and
it explicitly respects the cgroup hierarchy. It shows up in
/proc/cgroups, and I had no problem mounting a cgroupfs instance with
perf_event enabled. So I'm not sure what you mean.
^ permalink raw reply
* [PATCH net] lwtunnel: fix autoload of lwt modules
From: David Ahern @ 2017-01-17 5:33 UTC (permalink / raw)
To: netdev; +Cc: rshearma, David Ahern
Trying to add an mpls encap route when the MPLS modules are not loaded
hangs. For example:
CONFIG_MPLS=y
CONFIG_NET_MPLS_GSO=m
CONFIG_MPLS_ROUTING=m
CONFIG_MPLS_IPTUNNEL=m
$ ip route add 10.10.10.10/32 encap mpls 100 via inet 10.100.1.2
The ip command hangs:
root 880 826 0 21:25 pts/0 00:00:00 ip route add 10.10.10.10/32 encap mpls 100 via inet 10.100.1.2
$ cat /proc/880/stack
[<ffffffff81065a9b>] call_usermodehelper_exec+0xd6/0x134
[<ffffffff81065efc>] __request_module+0x27b/0x30a
[<ffffffff814542f6>] lwtunnel_build_state+0xe4/0x178
[<ffffffff814aa1e4>] fib_create_info+0x47f/0xdd4
[<ffffffff814ae451>] fib_table_insert+0x90/0x41f
[<ffffffff814a8010>] inet_rtm_newroute+0x4b/0x52
...
modprobe is trying to load rtnl-lwt-MPLS:
root 881 5 0 21:25 ? 00:00:00 /sbin/modprobe -q -- rtnl-lwt-MPLS
and it hangs after loading mpls_router:
$ cat /proc/881/stack
[<ffffffff81441537>] rtnl_lock+0x12/0x14
[<ffffffff8142ca2a>] register_netdevice_notifier+0x16/0x179
[<ffffffffa0033025>] mpls_init+0x25/0x1000 [mpls_router]
[<ffffffff81000471>] do_one_initcall+0x8e/0x13f
[<ffffffff81119961>] do_init_module+0x5a/0x1e5
[<ffffffff810bd070>] load_module+0x13bd/0x17d6
...
The problem is that lwtunnel_build_state is called with rtnl lock
held preventing mpls_init from registering. Fix by dropping the
lock before invoking request_module.
Fixes: 745041e2aaf1 ("lwtunnel: autoload of lwt modules")
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
---
This is a best guess at the Fixes.
net/core/lwtunnel.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/core/lwtunnel.c b/net/core/lwtunnel.c
index a5d4e866ce88..c14ee4d62a8a 100644
--- a/net/core/lwtunnel.c
+++ b/net/core/lwtunnel.c
@@ -120,7 +120,9 @@ int lwtunnel_build_state(struct net_device *dev, u16 encap_type,
if (encap_type_str) {
rcu_read_unlock();
+ __rtnl_unlock();
request_module("rtnl-lwt-%s", encap_type_str);
+ rtnl_lock();
rcu_read_lock();
ops = rcu_dereference(lwtun_encaps[encap_type]);
}
--
2.1.4
^ permalink raw reply related
* [PATCH] bpf: Fix test_lru_sanity5() in test_lru_map.c
From: Martin KaFai Lau @ 2017-01-17 6:17 UTC (permalink / raw)
To: netdev; +Cc: Daniel Borkmann, Alexei Starovoitov, Kernel Team
test_lru_sanity5() fails when the number of online cpus
is fewer than the number of possible cpus. It can be
reproduced with qemu by using cmd args "--smp cpus=2,maxcpus=8".
The problem is the loop in test_lru_sanity5() is testing
'i' which is incorrect.
This patch:
1. Make sched_next_online() always return -1 if it cannot
find a next cpu to schedule the process.
2. In test_lru_sanity5(), the parent process does
sched_setaffinity() first (through sched_next_online())
and the forked process will inherit it according to
the 'man sched_setaffinity'.
Fixes: 5db58faf989f ("bpf: Add tests for the LRU bpf_htab")
Reported-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
---
tools/testing/selftests/bpf/test_lru_map.c | 53 +++++++++++++++---------------
1 file changed, 27 insertions(+), 26 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_lru_map.c b/tools/testing/selftests/bpf/test_lru_map.c
index b13fed534d76..9f7bd1915c21 100644
--- a/tools/testing/selftests/bpf/test_lru_map.c
+++ b/tools/testing/selftests/bpf/test_lru_map.c
@@ -67,21 +67,23 @@ static int map_equal(int lru_map, int expected)
return map_subset(lru_map, expected) && map_subset(expected, lru_map);
}
-static int sched_next_online(int pid, int next_to_try)
+static int sched_next_online(int pid, int *next_to_try)
{
cpu_set_t cpuset;
+ int next = *next_to_try;
+ int ret = -1;
- if (next_to_try == nr_cpus)
- return -1;
-
- while (next_to_try < nr_cpus) {
+ while (next < nr_cpus) {
CPU_ZERO(&cpuset);
- CPU_SET(next_to_try++, &cpuset);
- if (!sched_setaffinity(pid, sizeof(cpuset), &cpuset))
+ CPU_SET(next++, &cpuset);
+ if (!sched_setaffinity(pid, sizeof(cpuset), &cpuset)) {
+ ret = 0;
break;
+ }
}
- return next_to_try;
+ *next_to_try = next;
+ return ret;
}
/* Size of the LRU amp is 2
@@ -96,11 +98,12 @@ static void test_lru_sanity0(int map_type, int map_flags)
{
unsigned long long key, value[nr_cpus];
int lru_map_fd, expected_map_fd;
+ int next_cpu = 0;
printf("%s (map_type:%d map_flags:0x%X): ", __func__, map_type,
map_flags);
- assert(sched_next_online(0, 0) != -1);
+ assert(sched_next_online(0, &next_cpu) != -1);
if (map_flags & BPF_F_NO_COMMON_LRU)
lru_map_fd = create_map(map_type, map_flags, 2 * nr_cpus);
@@ -183,6 +186,7 @@ static void test_lru_sanity1(int map_type, int map_flags, unsigned int tgt_free)
int lru_map_fd, expected_map_fd;
unsigned int batch_size;
unsigned int map_size;
+ int next_cpu = 0;
if (map_flags & BPF_F_NO_COMMON_LRU)
/* Ther percpu lru list (i.e each cpu has its own LRU
@@ -196,7 +200,7 @@ static void test_lru_sanity1(int map_type, int map_flags, unsigned int tgt_free)
printf("%s (map_type:%d map_flags:0x%X): ", __func__, map_type,
map_flags);
- assert(sched_next_online(0, 0) != -1);
+ assert(sched_next_online(0, &next_cpu) != -1);
batch_size = tgt_free / 2;
assert(batch_size * 2 == tgt_free);
@@ -262,6 +266,7 @@ static void test_lru_sanity2(int map_type, int map_flags, unsigned int tgt_free)
int lru_map_fd, expected_map_fd;
unsigned int batch_size;
unsigned int map_size;
+ int next_cpu = 0;
if (map_flags & BPF_F_NO_COMMON_LRU)
/* Ther percpu lru list (i.e each cpu has its own LRU
@@ -275,7 +280,7 @@ static void test_lru_sanity2(int map_type, int map_flags, unsigned int tgt_free)
printf("%s (map_type:%d map_flags:0x%X): ", __func__, map_type,
map_flags);
- assert(sched_next_online(0, 0) != -1);
+ assert(sched_next_online(0, &next_cpu) != -1);
batch_size = tgt_free / 2;
assert(batch_size * 2 == tgt_free);
@@ -370,11 +375,12 @@ static void test_lru_sanity3(int map_type, int map_flags, unsigned int tgt_free)
int lru_map_fd, expected_map_fd;
unsigned int batch_size;
unsigned int map_size;
+ int next_cpu = 0;
printf("%s (map_type:%d map_flags:0x%X): ", __func__, map_type,
map_flags);
- assert(sched_next_online(0, 0) != -1);
+ assert(sched_next_online(0, &next_cpu) != -1);
batch_size = tgt_free / 2;
assert(batch_size * 2 == tgt_free);
@@ -430,11 +436,12 @@ static void test_lru_sanity4(int map_type, int map_flags, unsigned int tgt_free)
int lru_map_fd, expected_map_fd;
unsigned long long key, value[nr_cpus];
unsigned long long end_key;
+ int next_cpu = 0;
printf("%s (map_type:%d map_flags:0x%X): ", __func__, map_type,
map_flags);
- assert(sched_next_online(0, 0) != -1);
+ assert(sched_next_online(0, &next_cpu) != -1);
if (map_flags & BPF_F_NO_COMMON_LRU)
lru_map_fd = create_map(map_type, map_flags,
@@ -502,9 +509,8 @@ static void do_test_lru_sanity5(unsigned long long last_key, int map_fd)
static void test_lru_sanity5(int map_type, int map_flags)
{
unsigned long long key, value[nr_cpus];
- int next_sched_cpu = 0;
+ int next_cpu = 0;
int map_fd;
- int i;
if (map_flags & BPF_F_NO_COMMON_LRU)
return;
@@ -519,27 +525,20 @@ static void test_lru_sanity5(int map_type, int map_flags)
key = 0;
assert(!bpf_map_update(map_fd, &key, value, BPF_NOEXIST));
- for (i = 0; i < nr_cpus; i++) {
+ while (sched_next_online(0, &next_cpu) != -1) {
pid_t pid;
pid = fork();
if (pid == 0) {
- next_sched_cpu = sched_next_online(0, next_sched_cpu);
- if (next_sched_cpu != -1)
- do_test_lru_sanity5(key, map_fd);
+ do_test_lru_sanity5(key, map_fd);
exit(0);
} else if (pid == -1) {
- printf("couldn't spawn #%d process\n", i);
+ printf("couldn't spawn process to test key:%llu\n",
+ key);
exit(1);
} else {
int status;
- /* It is mostly redundant and just allow the parent
- * process to update next_shced_cpu for the next child
- * process
- */
- next_sched_cpu = sched_next_online(pid, next_sched_cpu);
-
assert(waitpid(pid, &status, 0) == pid);
assert(status == 0);
key++;
@@ -547,6 +546,8 @@ static void test_lru_sanity5(int map_type, int map_flags)
}
close(map_fd);
+ /* At least one key should be tested */
+ assert(key > 0);
printf("Pass\n");
}
--
2.5.1
^ permalink raw reply related
* Re: fq_codel and skb->hash
From: Tom Herbert @ 2017-01-17 6:18 UTC (permalink / raw)
To: Eric Dumazet
Cc: Andrew Collins, Linux Kernel Network Developers, Eric Dumazet
In-Reply-To: <1484620480.13165.65.camel@edumazet-glaptop3.roam.corp.google.com>
On Mon, Jan 16, 2017 at 6:34 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Mon, 2017-01-16 at 17:44 -0800, Eric Dumazet wrote:
>> On Mon, 2017-01-16 at 17:04 -0700, Andrew Collins wrote:
>
>> > Is there a better way to manage flow separation in routed+encapsulated traffic?
>>
>> Encapsulated traffic is fine, since flow dissector skips encap header(s)
>> up to the L4 header.
>>
>> Problem is about encrypted traffic, since presumably this L4 header is
>> opaque for flow dissector ;)
>
>
> BTW, how can we make sure skb->hash is populated before IPSEC ?
>
> Relying on forwarding, and skb->hash set by a device might be not
> enough.
>
Should we do skb_get_hash upon entry to IPsec?
Tom
>
>
^ permalink raw reply
* Re: [PATCH net-next 6/9] net/mlx4_en: Adding support of turning off link autonegotiation via ethtool
From: Or Gerlitz @ 2017-01-17 7:21 UTC (permalink / raw)
To: Ariel Levkovich
Cc: Tariq Toukan, David S. Miller, Linux Netdev List, Eran Ben Elisha
In-Reply-To: <DB3PR05MB21933E49B3A1B8CC0C37A32BA7D0@DB3PR05MB219.eurprd05.prod.outlook.com>
On Tue, Jan 17, 2017 at 1:08 AM, Ariel Levkovich <lariel@mellanox.com> wrote:
> + MLX4_PTYS_AN_DISABLE_CAP = 1 << 5,
>
> It's there.
It would be good to spare few words on that aspect in the change log.
^ permalink raw reply
* Re: [PATCH net-next 6/9] net/mlx4_en: Adding support of turning off link autonegotiation via ethtool
From: Or Gerlitz @ 2017-01-17 7:20 UTC (permalink / raw)
To: Ariel Levkovich
Cc: Tariq Toukan, David S. Miller, Linux Netdev List, Eran Ben Elisha
In-Reply-To: <DB3PR05MB21933E49B3A1B8CC0C37A32BA7D0@DB3PR05MB219.eurprd05.prod.outlook.com>
On Tue, Jan 17, 2017 at 1:08 AM, Ariel Levkovich <lariel@mellanox.com> wrote:
> + MLX4_PTYS_AN_DISABLE_CAP = 1 << 5,
>
> It's there.
I'll look, but please bring a cake to the office, we started doing
that in order to prevent people from
replying in top posting to linux mailing list.
Or.
^ permalink raw reply
* [PATCH] net: fec: Fixed panic problem with non-tso
From: Yuusuke Ashiduka @ 2017-01-17 7:48 UTC (permalink / raw)
To: fugang.duan; +Cc: netdev, Yuusuke Ashiduka
If highmem and 2GB or more of memory are valid,
"this_frag-> page.p" indicates the highmem area,
so the result of page_address() is NULL and panic occurs.
This commit fixes this by using the skb_frag_dma_map() helper,
which takes care of mapping the skb fragment properly. Additionally,
the type of mapping is now tracked, so it can be unmapped using
dma_unmap_page or dma_unmap_single when appropriate.
---
drivers/net/ethernet/freescale/fec.h | 1 +
drivers/net/ethernet/freescale/fec_main.c | 48 +++++++++++++++++++++++--------
2 files changed, 37 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h
index 5ea740b4cf14..5b187e8aacf0 100644
--- a/drivers/net/ethernet/freescale/fec.h
+++ b/drivers/net/ethernet/freescale/fec.h
@@ -463,6 +463,7 @@ struct bufdesc_prop {
struct fec_enet_priv_tx_q {
struct bufdesc_prop bd;
unsigned char *tx_bounce[TX_RING_SIZE];
+ int tx_page_mapping[TX_RING_SIZE];
struct sk_buff *tx_skbuff[TX_RING_SIZE];
unsigned short tx_stop_threshold;
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 38160c2bebcb..b1562107e337 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -60,6 +60,7 @@
#include <linux/if_vlan.h>
#include <linux/pinctrl/consumer.h>
#include <linux/prefetch.h>
+#include <linux/highmem.h>
#include <soc/imx/cpuidle.h>
#include <asm/cacheflush.h>
@@ -377,20 +378,28 @@ fec_enet_txq_submit_frag_skb(struct fec_enet_priv_tx_q *txq,
ebdp->cbd_esc = cpu_to_fec32(estatus);
}
- bufaddr = page_address(this_frag->page.p) + this_frag->page_offset;
-
index = fec_enet_get_bd_index(bdp, &txq->bd);
- if (((unsigned long) bufaddr) & fep->tx_align ||
+ txq->tx_page_mapping[index] = 0;
+ if (this_frag->page_offset & fep->tx_align ||
fep->quirks & FEC_QUIRK_SWAP_FRAME) {
+ bufaddr = kmap_atomic(this_frag->page.p) +
+ this_frag->page_offset;
memcpy(txq->tx_bounce[index], bufaddr, frag_len);
+ kunmap_atomic(bufaddr);
bufaddr = txq->tx_bounce[index];
if (fep->quirks & FEC_QUIRK_SWAP_FRAME)
swap_buffer(bufaddr, frag_len);
+ addr = dma_map_single(&fep->pdev->dev,
+ bufaddr,
+ frag_len,
+ DMA_TO_DEVICE);
+ } else {
+ txq->tx_page_mapping[index] = 1;
+ addr = skb_frag_dma_map(&fep->pdev->dev, this_frag, 0,
+ frag_len, DMA_TO_DEVICE);
}
- addr = dma_map_single(&fep->pdev->dev, bufaddr, frag_len,
- DMA_TO_DEVICE);
if (dma_mapping_error(&fep->pdev->dev, addr)) {
if (net_ratelimit())
netdev_err(ndev, "Tx DMA memory map failed\n");
@@ -411,8 +420,16 @@ fec_enet_txq_submit_frag_skb(struct fec_enet_priv_tx_q *txq,
bdp = txq->bd.cur;
for (i = 0; i < frag; i++) {
bdp = fec_enet_get_nextdesc(bdp, &txq->bd);
- dma_unmap_single(&fep->pdev->dev, fec32_to_cpu(bdp->cbd_bufaddr),
- fec16_to_cpu(bdp->cbd_datlen), DMA_TO_DEVICE);
+ if (txq->tx_page_mapping[index])
+ dma_unmap_page(&fep->pdev->dev,
+ fec32_to_cpu(bdp->cbd_bufaddr),
+ fec16_to_cpu(bdp->cbd_datlen),
+ DMA_TO_DEVICE);
+ else
+ dma_unmap_single(&fep->pdev->dev,
+ fec32_to_cpu(bdp->cbd_bufaddr),
+ fec16_to_cpu(bdp->cbd_datlen),
+ DMA_TO_DEVICE);
}
return ERR_PTR(-ENOMEM);
}
@@ -1201,11 +1218,18 @@ fec_enet_tx_queue(struct net_device *ndev, u16 queue_id)
skb = txq->tx_skbuff[index];
txq->tx_skbuff[index] = NULL;
- if (!IS_TSO_HEADER(txq, fec32_to_cpu(bdp->cbd_bufaddr)))
- dma_unmap_single(&fep->pdev->dev,
- fec32_to_cpu(bdp->cbd_bufaddr),
- fec16_to_cpu(bdp->cbd_datlen),
- DMA_TO_DEVICE);
+ if (!IS_TSO_HEADER(txq, fec32_to_cpu(bdp->cbd_bufaddr))) {
+ if (txq->tx_page_mapping[index])
+ dma_unmap_page(&fep->pdev->dev,
+ fec32_to_cpu(bdp->cbd_bufaddr),
+ fec16_to_cpu(bdp->cbd_datlen),
+ DMA_TO_DEVICE);
+ else
+ dma_unmap_single(&fep->pdev->dev,
+ fec32_to_cpu(bdp->cbd_bufaddr),
+ fec16_to_cpu(bdp->cbd_datlen),
+ DMA_TO_DEVICE);
+ }
bdp->cbd_bufaddr = cpu_to_fec32(0);
if (!skb)
goto skb_done;
--
2.11.0
^ permalink raw reply related
* Re: fs, net: deadlock between bind/splice on af_unix
From: Eric W. Biederman @ 2017-01-17 8:07 UTC (permalink / raw)
To: Al Viro
Cc: Cong Wang, Dmitry Vyukov, linux-fsdevel@vger.kernel.org, LKML,
David Miller, Rainer Weikusat, Hannes Frederic Sowa, netdev,
Eric Dumazet, syzkaller
In-Reply-To: <20161209064144.GZ1555@ZenIV.linux.org.uk>
Al Viro <viro@ZenIV.linux.org.uk> writes:
> On Thu, Dec 08, 2016 at 10:32:00PM -0800, Cong Wang wrote:
>
>> > Why do we do autobind there, anyway, and why is it conditional on
>> > SOCK_PASSCRED? Note that e.g. for SOCK_STREAM we can bloody well get
>> > to sending stuff without autobind ever done - just use socketpair()
>> > to create that sucker and we won't be going through the connect()
>> > at all.
>>
>> In the case Dmitry reported, unix_dgram_sendmsg() calls unix_autobind(),
>> not SOCK_STREAM.
>
> Yes, I've noticed. What I'm asking is what in there needs autobind triggered
> on sendmsg and why doesn't the same need affect the SOCK_STREAM case?
With respect to the conditionality on SOCK_PASSCRED those are the linux
semantics. Semantically that is the way the code has behaved since
2.1.15 when support for passing credentials was added to the code.
So I presume someone thought it was a good idea to have a name for
a socket that is sending credentials to another socket. It certainly
seems reasonable at first glance.
With socketpair the only path that doesn't enforce this with
SOCK_STREAM and SOCK_PASSCRED that is either an oversight or a don't
care because we already know who is at the other end.
I can imagine two possible fixes:
1) Declare that splice is non-sense in the presence of SOCK_PASSCRED.
2) Someone adds a preparation operation that can be called on
af_unix sockets that will ensure the autobind happens before
any problematic locks are taken.
Eric
^ permalink raw reply
* [PATCH] net: phy: dp83848: add DP83620 PHY support
From: Alvaro Gamez Machado @ 2017-01-17 8:08 UTC (permalink / raw)
To: Florian Fainelli, netdev; +Cc: Alvaro Gamez Machado
This PHY with fiber support is register compatible with DP83848,
so add support for it.
Signed-off-by: Alvaro Gamez Machado <alvaro.gamez@hazent.com>
---
drivers/net/phy/dp83848.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/phy/dp83848.c b/drivers/net/phy/dp83848.c
index 800b39f06279..a10d0e7fc5f7 100644
--- a/drivers/net/phy/dp83848.c
+++ b/drivers/net/phy/dp83848.c
@@ -17,6 +17,7 @@
#include <linux/phy.h>
#define TI_DP83848C_PHY_ID 0x20005ca0
+#define TI_DP83620_PHY_ID 0x20005ce0
#define NS_DP83848C_PHY_ID 0x20005c90
#define TLK10X_PHY_ID 0x2000a210
#define TI_DP83822_PHY_ID 0x2000a240
@@ -77,6 +78,7 @@ static int dp83848_config_intr(struct phy_device *phydev)
static struct mdio_device_id __maybe_unused dp83848_tbl[] = {
{ TI_DP83848C_PHY_ID, 0xfffffff0 },
{ NS_DP83848C_PHY_ID, 0xfffffff0 },
+ { TI_DP83620_PHY_ID, 0xfffffff0 },
{ TLK10X_PHY_ID, 0xfffffff0 },
{ TI_DP83822_PHY_ID, 0xfffffff0 },
{ }
@@ -106,6 +108,7 @@ MODULE_DEVICE_TABLE(mdio, dp83848_tbl);
static struct phy_driver dp83848_driver[] = {
DP83848_PHY_DRIVER(TI_DP83848C_PHY_ID, "TI DP83848C 10/100 Mbps PHY"),
DP83848_PHY_DRIVER(NS_DP83848C_PHY_ID, "NS DP83848C 10/100 Mbps PHY"),
+ DP83848_PHY_DRIVER(TI_DP83620_PHY_ID, "TI DP83620 10/100 Mbps PHY"),
DP83848_PHY_DRIVER(TLK10X_PHY_ID, "TI TLK10X 10/100 Mbps PHY"),
DP83848_PHY_DRIVER(TI_DP83822_PHY_ID, "TI DP83822 10/100 Mbps PHY"),
};
--
2.11.0
^ 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