* [PATCH v2 net-next 11/11] ibmvnic: Move queue restarting in ibmvnic_tx_complete
From: Nathan Fontenot @ 2017-05-01 21:57 UTC (permalink / raw)
To: netdev; +Cc: brking, jallen, muvic, tlfalcon
In-Reply-To: <20170501215424.27224.53918.stgit@ltcalpine2-lp23.aus.stglabs.ibm.com>
Restart of the subqueue should occur outside of the loop processing
any tx buffers instead of doing this in the middle of the loop.
Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
---
v2: Use __netif_subqueue_stopped() instead of netif_subqueue_stopped()
to avoid possible using un-initialized skb variable.
---
drivers/net/ethernet/ibm/ibmvnic.c | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 4a2b99f..4c5de60 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1809,19 +1809,8 @@ static int ibmvnic_complete_tx(struct ibmvnic_adapter *adapter,
}
if (txbuff->last_frag) {
- if (atomic_sub_return(next->tx_comp.num_comps,
- &scrq->used) <=
- (adapter->req_tx_entries_per_subcrq / 2) &&
- netif_subqueue_stopped(adapter->netdev,
- txbuff->skb)) {
- netif_wake_subqueue(adapter->netdev,
- scrq->pool_index);
- netdev_dbg(adapter->netdev,
- "Started queue %d\n",
- scrq->pool_index);
- }
-
dev_kfree_skb_any(txbuff->skb);
+ txbuff->skb = NULL;
}
adapter->tx_pool[pool].free_map[adapter->tx_pool[pool].
@@ -1832,6 +1821,15 @@ static int ibmvnic_complete_tx(struct ibmvnic_adapter *adapter,
}
/* remove tx_comp scrq*/
next->tx_comp.first = 0;
+
+ if (atomic_sub_return(next->tx_comp.num_comps, &scrq->used) <=
+ (adapter->req_tx_entries_per_subcrq / 2) &&
+ __netif_subqueue_stopped(adapter->netdev,
+ scrq->pool_index)) {
+ netif_wake_subqueue(adapter->netdev, scrq->pool_index);
+ netdev_info(adapter->netdev, "Started queue %d\n",
+ scrq->pool_index);
+ }
}
enable_scrq_irq(adapter, scrq);
^ permalink raw reply related
* [PATCH v2 net-next 08/11] ibmvnic: Check for driver reset first in ibmvnic_xmit
From: Nathan Fontenot @ 2017-05-01 21:57 UTC (permalink / raw)
To: netdev; +Cc: brking, jallen, muvic, tlfalcon
In-Reply-To: <20170501215424.27224.53918.stgit@ltcalpine2-lp23.aus.stglabs.ibm.com>
Move the check for the driver resetting to the first thing
in ibmvnic_xmit().
Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
---
drivers/net/ethernet/ibm/ibmvnic.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 4da7080..2cf1b64 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -985,12 +985,6 @@ static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
int index = 0;
int ret = 0;
- tx_pool = &adapter->tx_pool[queue_num];
- tx_scrq = adapter->tx_scrq[queue_num];
- txq = netdev_get_tx_queue(netdev, skb_get_queue_mapping(skb));
- handle_array = (u64 *)((u8 *)(adapter->login_rsp_buf) +
- be32_to_cpu(adapter->login_rsp_buf->
- off_txsubm_subcrqs));
if (adapter->resetting) {
if (!netif_subqueue_stopped(netdev, skb))
netif_stop_subqueue(netdev, queue_num);
@@ -1002,6 +996,12 @@ static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
goto out;
}
+ tx_pool = &adapter->tx_pool[queue_num];
+ tx_scrq = adapter->tx_scrq[queue_num];
+ txq = netdev_get_tx_queue(netdev, skb_get_queue_mapping(skb));
+ handle_array = (u64 *)((u8 *)(adapter->login_rsp_buf) +
+ be32_to_cpu(adapter->login_rsp_buf->off_txsubm_subcrqs));
+
index = tx_pool->free_map[tx_pool->consumer_index];
offset = index * adapter->req_mtu;
dst = tx_pool->long_term_buff.buff + offset;
^ permalink raw reply related
* Re: How does vlan driver pass vlan info to the h/w ethernet driver
From: carl h @ 2017-05-01 18:26 UTC (permalink / raw)
To: David Miller; +Cc: Andrew Lunn, netdev
In-Reply-To: <20170501.105736.157375316602250235.davem@davemloft.net>
It appears that the switchdev driver model was introduced after 2.6.39
which is the
kernel version that I'm using unfortunately.
So considering this, and the fact that the switch hardware I'm using has support
for vlan tag insertion, how would it have been accomplished for my version
of the kernel?
Also is it possible to get the vlan driver to insert the vlan tags for
each packet? If so
how can that be accomplished?
Thanks
/carl
On Mon, May 1, 2017 at 10:57 AM, David Miller <davem@davemloft.net> wrote:
> From: carl h <heyen2000@gmail.com>
> Date: Mon, 1 May 2017 10:52:17 -0400
>
>> But i can't see how the vlan info propagates down to the switch driver.
>
> Which "VLAN info" are you talking about?
>
> The VLANs configured onto the device itself or the per-packet VLAN
> info.
>
> Per-device VLAN configuration is communicated to the netdev driver
> via netdev_ops->ndo_vlan_{add,kill}_vid().
>
> Per-packet VLAN information is stored in skb->vlan_{proto,tci}.
^ permalink raw reply
* Re: [PATCH v2 net-next 10/11] From: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
From: David Miller @ 2017-05-01 18:27 UTC (permalink / raw)
To: nfont; +Cc: netdev, brking, jallen, muvic, tlfalcon
In-Reply-To: <20170501215737.27224.47900.stgit@ltcalpine2-lp23.aus.stglabs.ibm.com>
From: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date: Mon, 01 May 2017 17:57:37 -0400
> From: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
>
> ibmvnic: Record SKB RX queue during poll
>
> Map each RX SKB to the RX queue associated with the driver's RX SCRQ.
> This should improve the RX CPU load balancing issues seen by the
> performance team.
>
> Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Please resend this series, this subject line is not correct.
^ permalink raw reply
* Re: [PATCH v4 binutils] Add BPF support to binutils...
From: Aaron Conole @ 2017-05-01 18:39 UTC (permalink / raw)
To: David Miller; +Cc: ast, daniel, netdev, xdp-newbies
In-Reply-To: <20170501.135202.2175412915689459473.davem@davemloft.net>
David Miller <davem@davemloft.net> writes:
> From: Aaron Conole <aconole@bytheb.org>
> Date: Mon, 01 May 2017 13:22:00 -0400
>
>> x86-64:
>> Running /home/aconole/git/binutils-gdb/gas/testsuite/gas/bpf/bpf.exp ...
>> FAIL: jump
>> FAIL: call
>> FAIL: imm64a
>> Running /home/aconole/git/binutils-gdb/gas/testsuite/gas/cfi/cfi.exp ...
>
> I cannot reproduce this, can you show what it says in the:
>
> /home/aconole/git/binutils-gdb/gas/testsuite/gas.log
>
> file near the "FAIL" cases?
Executing on host: sh -c {/home/aconole/git/binutils-gdb/gas/testsuite/../../binutils/objdump -dr dump.o >dump.out 2>gas.stderr} /dev/null (timeout = 300)
spawn [open ...]
regexp_diff match failure
regexp "^ 108: 95 00 00 00 00 00 00 00 exit$"
line " 108: 95 00 00 00 00 00 00 00 exit "
FAIL: jump
Same style of error for call and imm64a. After reverting and then
re-applying your patch, the FAILs all go away, so I must have broken
these files somehow. Sorry for the false alarm.
-Aaron
^ permalink raw reply
* Re: pull request: bluetooth-next 2017-04-30
From: Johan Hedberg @ 2017-05-01 18:42 UTC (permalink / raw)
To: David Miller; +Cc: linux-bluetooth, netdev
In-Reply-To: <20170430.230336.142225761153252889.davem@davemloft.net>
Hi Dave,
On Sun, Apr 30, 2017, David Miller wrote:
> From: Johan Hedberg <johan.hedberg@gmail.com>
> Date: Sun, 30 Apr 2017 17:09:28 +0300
>
> > Here's one last batch of Bluetooth patches in the bluetooth-next tree
> > targeting the 4.12 kernel.
> >
> > - Remove custom ECDH implementation and use new KPP API instead
> > - Add protocol checks to hci_ldisc
> > - Add module license to HCI UART Nokia H4+ driver
> > - Minor fix for 32bit user space - 64 bit kernel combination
> >
> > Please let me know if there are any issues pulling. Thanks.
>
> Pulled, thanks Johan.
Thanks, however I don't see the patches in net-next yet. I have seen
other patches go in there since your response though. Cause for concern?
Johan
^ permalink raw reply
* Re: [PATCH v4 binutils] Add BPF support to binutils...
From: David Miller @ 2017-05-01 18:50 UTC (permalink / raw)
To: aconole; +Cc: ast, daniel, netdev, xdp-newbies
In-Reply-To: <f7t37coxvys.fsf@redhat.com>
From: Aaron Conole <aconole@bytheb.org>
Date: Mon, 01 May 2017 14:39:39 -0400
> David Miller <davem@davemloft.net> writes:
>
>> From: Aaron Conole <aconole@bytheb.org>
>> Date: Mon, 01 May 2017 13:22:00 -0400
>>
>>> x86-64:
>>> Running /home/aconole/git/binutils-gdb/gas/testsuite/gas/bpf/bpf.exp ...
>>> FAIL: jump
>>> FAIL: call
>>> FAIL: imm64a
>>> Running /home/aconole/git/binutils-gdb/gas/testsuite/gas/cfi/cfi.exp ...
>>
>> I cannot reproduce this, can you show what it says in the:
>>
>> /home/aconole/git/binutils-gdb/gas/testsuite/gas.log
>>
>> file near the "FAIL" cases?
>
> Executing on host: sh -c {/home/aconole/git/binutils-gdb/gas/testsuite/../../binutils/objdump -dr dump.o >dump.out 2>gas.stderr} /dev/null (timeout = 300)
> spawn [open ...]
> regexp_diff match failure
> regexp "^ 108: 95 00 00 00 00 00 00 00 exit$"
> line " 108: 95 00 00 00 00 00 00 00 exit "
> FAIL: jump
>
>
> Same style of error for call and imm64a. After reverting and then
> re-applying your patch, the FAILs all go away, so I must have broken
> these files somehow. Sorry for the false alarm.
Great, thanks for checking.
^ permalink raw reply
* Re: pull request: bluetooth-next 2017-04-30
From: David Miller @ 2017-05-01 18:50 UTC (permalink / raw)
To: johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-bluetooth-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20170501184221.GA2093@x1c>
From: Johan Hedberg <johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Mon, 1 May 2017 21:42:21 +0300
> Hi Dave,
>
> On Sun, Apr 30, 2017, David Miller wrote:
>> From: Johan Hedberg <johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> Date: Sun, 30 Apr 2017 17:09:28 +0300
>>
>> > Here's one last batch of Bluetooth patches in the bluetooth-next tree
>> > targeting the 4.12 kernel.
>> >
>> > - Remove custom ECDH implementation and use new KPP API instead
>> > - Add protocol checks to hci_ldisc
>> > - Add module license to HCI UART Nokia H4+ driver
>> > - Minor fix for 32bit user space - 64 bit kernel combination
>> >
>> > Please let me know if there are any issues pulling. Thanks.
>>
>> Pulled, thanks Johan.
>
> Thanks, however I don't see the patches in net-next yet. I have seen
> other patches go in there since your response though. Cause for concern?
Shuld be there now.
^ permalink raw reply
* Re: [PATCH v2 net-next] ip6_tunnel: Fix missing tunnel encapsulation limit option
From: David Miller @ 2017-05-01 18:53 UTC (permalink / raw)
To: kraigatgoog; +Cc: yoshfuji, kuznet, netdev
In-Reply-To: <20170426183745.194717-1-kraigatgoog@gmail.com>
From: Craig Gallek <kraigatgoog@gmail.com>
Date: Wed, 26 Apr 2017 14:37:45 -0400
> From: Craig Gallek <cgallek@google.com>
>
> The IPv6 tunneling code tries to insert IPV6_TLV_TNL_ENCAP_LIMIT and
> IPV6_TLV_PADN options when an encapsulation limit is defined (the
> default is a limit of 4). An MTU adjustment is done to account for
> these options as well. However, the options are never present in the
> generated packets.
>
> The issue appears to be a subtlety between IPV6_DSTOPTS and
> IPV6_RTHDRDSTOPTS defined in RFC 3542. When the IPIP tunnel driver was
> written, the encap limit options were included as IPV6_RTHDRDSTOPTS in
> dst0opt of struct ipv6_txoptions. Later, ipv6_push_nfrags_opts was
> (correctly) updated to require IPV6_RTHDR options when IPV6_RTHDRDSTOPTS
> are to be used. This caused the options to no longer be included in v6
> encapsulated packets.
>
> The fix is to use IPV6_DSTOPTS (in dst1opt of struct ipv6_txoptions)
> instead. IPV6_DSTOPTS do not have the additional IPV6_RTHDR requirement.
>
> Fixes: 1df64a8569c7: ("[IPV6]: Add ip6ip6 tunnel driver.")
> Fixes: 333fad5364d6: ("[IPV6]: Support several new sockopt / ancillary data in Advanced API (RFC3542)")
> Signed-off-by: Craig Gallek <kraig@google.com>
> ---
>
> v2: Change tunnel code to use dst1opt rather than making the checks for
> dst0opt more permissive.
Thanks for the detailed analysis in the commit message, this made reviewing
your patch a lot easier.
Applied, thank you.
^ permalink raw reply
* Re: [PATCH net-next] rhashtable: compact struct rhashtable_params
From: David Miller @ 2017-05-01 18:55 UTC (permalink / raw)
To: fw; +Cc: netdev
In-Reply-To: <20170427152809.6378-1-fw@strlen.de>
From: Florian Westphal <fw@strlen.de>
Date: Thu, 27 Apr 2017 17:28:09 +0200
> By using smaller datatypes this struct shrinks considerably
> (80 -> 48 bytes on x86_64).
>
> As this is embedded in other structs, this also reduces size of several
> others, e.g. cls_fl_head and nft_hash.
>
> Signed-off-by: Florian Westphal <fw@strlen.de>
This doesn't apply to net-next cleanly, please respin.
Thanks.
^ permalink raw reply
* Re: [PATCH net-next] net/esp4: Fix invalid esph pointer crash
From: David Miller @ 2017-05-01 18:59 UTC (permalink / raw)
To: ilant; +Cc: steffen.klassert, netdev
In-Reply-To: <20170430133438.31962-1-ilant@mellanox.com>
From: <ilant@mellanox.com>
Date: Sun, 30 Apr 2017 16:34:38 +0300
> From: Ilan Tayari <ilant@mellanox.com>
>
> Both esp_output and esp_xmit take a pointer to the ESP header
> and place it in esp_info struct prior to calling esp_output_head.
>
> Inside esp_output_head, the call to esp_output_udp_encap
> makes sure to update the pointer if it gets invalid.
> However, if esp_output_head itself calls skb_cow_data, the
> pointer is not updated and stays invalid, causing a crash
> after esp_output_head returns.
>
> Update the pointer if it becomes invalid in esp_output_head
>
> Fixes: fca11ebde3f0 ("esp4: Reorganize esp_output")
> Signed-off-by: Ilan Tayari <ilant@mellanox.com>
Looks good, applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next] xfrm: Indicate xfrm_state offload errors
From: David Miller @ 2017-05-01 19:00 UTC (permalink / raw)
To: ilant; +Cc: steffen.klassert, netdev
In-Reply-To: <20170430135119.11159-1-ilant@mellanox.com>
From: <ilant@mellanox.com>
Date: Sun, 30 Apr 2017 16:51:19 +0300
> From: Ilan Tayari <ilant@mellanox.com>
>
> Current code silently ignores driver errors when configuring
> IPSec offload xfrm_state, and falls back to host-based crypto.
>
> Fail the xfrm_state creation if the driver has an error, because
> the NIC offloading was explicitly requested by the user program.
>
> This will communicate back to the user that there was an error.
>
> Fixes: d77e38e612a0 ("xfrm: Add an IPsec hardware offloading API")
> Signed-off-by: Ilan Tayari <ilant@mellanox.com>
Also applied.
Steffen, I apologize for taking these directly but I really wanted to
make sure these fixes made it into the pull request I plan to send to
Linus for the merge window soon.
Thanks.
^ permalink raw reply
* Question about tcp_mark_lost_retrans
From: Joe Smith @ 2017-05-01 19:01 UTC (permalink / raw)
To: netdev
In the following code, write queue is traversed and ack_seq of the
skb's is used. Can someone please point out how/where it is
initialized. I can only see it being initialized in tcp_transmit_skb
but that skb will be freed since it is a clone. I could not find where
the skb queued in the write queue is initialized.
Thanks,
static void tcp_mark_lost_retrans(struct sock *sk)
{
const struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *skb;
int cnt = 0;
u32 new_low_seq = tp->snd_nxt;
u32 received_upto = tcp_highest_sack_seq(tp);
if (!tcp_is_fack(tp) || !tp->retrans_out ||
!after(received_upto, tp->lost_retrans_low) ||
icsk->icsk_ca_state != TCP_CA_Recovery)
return;
tcp_for_write_queue(skb, sk) {
u32 ack_seq = TCP_SKB_CB(skb)->ack_seq; <======
if (skb == tcp_send_head(sk))
break;
--
JS
^ permalink raw reply
* Re: [PATCH v5 net-next]smsc911x: Adding support for Micochip LAN9250 Ethernet controller
From: David Miller @ 2017-05-01 19:01 UTC (permalink / raw)
To: David.Cai; +Cc: netdev, UNGLinuxDriver, steve.glendinning
In-Reply-To: <C3C28FB10418274EB7FD7C2B85C796A4412480F1@CHN-SV-EXMX02.mchp-main.com>
From: <David.Cai@microchip.com>
Date: Mon, 1 May 2017 15:46:56 +0000
> From: David Cai <david.cai@microchip.com>
>
> Adding support for Microchip LAN9250 Ethernet controller.
>
> Signed-off-by: David Cai <david.cai@microchip.com>
This doesn't apply cleanly to net-next, please respin.
^ permalink raw reply
* Re: [PATCH net-next v2 00/18] net: dsa: mv88e6xxx: 802.1s and 88E6390 VTU
From: David Miller @ 2017-05-01 19:03 UTC (permalink / raw)
To: vivien.didelot; +Cc: netdev, linux-kernel, kernel, f.fainelli, andrew
In-Reply-To: <20170501180527.11756-1-vivien.didelot@savoirfairelinux.com>
From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Date: Mon, 1 May 2017 14:05:09 -0400
> This patch series adds support for the VLAN Table Unit (a.k.a. the VTU)
> to the 88E6390 family of Marvell Ethernet switch chips. The plumbing for
> the per VLAN Spanning Tree support is added as a side effect of the
> necessary refactoring.
Series applied, thanks.
^ permalink raw reply
* Re: Question about tcp_mark_lost_retrans
From: David Miller @ 2017-05-01 19:10 UTC (permalink / raw)
To: codesoldier1; +Cc: netdev
In-Reply-To: <CABGNecwM2eDJpPLMQZZ3DCsGDO4ktsX-R43dvgTQkd1Etq+WjA@mail.gmail.com>
From: Joe Smith <codesoldier1@gmail.com>
Date: Mon, 1 May 2017 12:01:33 -0700
> static void tcp_mark_lost_retrans(struct sock *sk)
This function no longer exists in the tree.
^ permalink raw reply
* [PATCH] ipv6: Need to export ipv6_push_frag_opts for tunneling now.
From: David Miller @ 2017-05-01 19:11 UTC (permalink / raw)
To: cgallek; +Cc: netdev
Since that change also made the nfrag function not necessary
for exports, remove it.
Fixes: 89a23c8b528b ("ip6_tunnel: Fix missing tunnel encapsulation limit option")
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/ipv6/exthdrs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index d32e211..b636f1da 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -946,13 +946,13 @@ void ipv6_push_nfrag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt,
if (opt->hopopt)
ipv6_push_exthdr(skb, proto, NEXTHDR_HOP, opt->hopopt);
}
-EXPORT_SYMBOL(ipv6_push_nfrag_opts);
void ipv6_push_frag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, u8 *proto)
{
if (opt->dst1opt)
ipv6_push_exthdr(skb, proto, NEXTHDR_DEST, opt->dst1opt);
}
+EXPORT_SYMBOL(ipv6_push_frag_opts);
struct ipv6_txoptions *
ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt)
--
2.4.11
^ permalink raw reply related
* Re: Question about tcp_mark_lost_retrans
From: Joe Smith @ 2017-05-01 19:12 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20170501.151042.1997320785999410909.davem@davemloft.net>
Thanks Dave. I was looking at linux-stable-v4.11-rc7. I will sync up.
On Mon, May 1, 2017 at 12:10 PM, David Miller <davem@davemloft.net> wrote:
> From: Joe Smith <codesoldier1@gmail.com>
> Date: Mon, 1 May 2017 12:01:33 -0700
>
>> static void tcp_mark_lost_retrans(struct sock *sk)
>
> This function no longer exists in the tree.
--
JS
^ permalink raw reply
* Re: pull request: bluetooth-next 2017-04-30
From: Johan Hedberg @ 2017-05-01 19:21 UTC (permalink / raw)
To: David Miller; +Cc: linux-bluetooth, netdev
In-Reply-To: <20170501.145019.1619484787513762409.davem@davemloft.net>
On Mon, May 01, 2017, David Miller wrote:
> From: Johan Hedberg <johan.hedberg@gmail.com>
> Date: Mon, 1 May 2017 21:42:21 +0300
>
> > Hi Dave,
> >
> > On Sun, Apr 30, 2017, David Miller wrote:
> >> From: Johan Hedberg <johan.hedberg@gmail.com>
> >> Date: Sun, 30 Apr 2017 17:09:28 +0300
> >>
> >> > Here's one last batch of Bluetooth patches in the bluetooth-next tree
> >> > targeting the 4.12 kernel.
> >> >
> >> > - Remove custom ECDH implementation and use new KPP API instead
> >> > - Add protocol checks to hci_ldisc
> >> > - Add module license to HCI UART Nokia H4+ driver
> >> > - Minor fix for 32bit user space - 64 bit kernel combination
> >> >
> >> > Please let me know if there are any issues pulling. Thanks.
> >>
> >> Pulled, thanks Johan.
> >
> > Thanks, however I don't see the patches in net-next yet. I have seen
> > other patches go in there since your response though. Cause for concern?
>
> Shuld be there now.
Looks good now. Thanks.
Johan
^ permalink raw reply
* Re: How does vlan driver pass vlan info to the h/w ethernet driver
From: Andrew Lunn @ 2017-05-01 19:29 UTC (permalink / raw)
To: carl h; +Cc: David Miller, netdev
In-Reply-To: <CABM+yxnbLPjoq4E2Z3d2Jc5qUvN_TWUb6rQpjDWCTs=9j0ce3A@mail.gmail.com>
On Mon, May 01, 2017 at 02:26:52PM -0400, carl h wrote:
> It appears that the switchdev driver model was introduced after 2.6.39
> which is the
> kernel version that I'm using unfortunately.
We cannot help you much is you are using an ancient kernel. Please
upgrade.
Andrew
^ permalink raw reply
* more bpf samples build breakage...
From: David Miller @ 2017-05-01 19:30 UTC (permalink / raw)
To: daniel; +Cc: netdev
Inlcuding bpf_util.h into test_pkt_access.c et al. broke the build even
more so than it already is on sparc.
The problem is we end up including all the stdio.h bits and eventually
hit things like:
In file included from /usr/include/stdio.h:933:
/usr/include/bits/stdio-ldbl.h:28:20: error: cannot apply asm label to function after its first use
__LDBL_REDIR_DECL (vfprintf)
~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/usr/include/sys/cdefs.h:373:26: note: expanded from macro '__LDBL_REDIR_DECL'
extern __typeof (name) name __asm (__ASMNAME ("__nldbl_" #name));
So please let's put CLANG compiled helpers into header files
specifically meant to be included by CLANG compiled BPF programs
rather than the host build environment.
^ permalink raw reply
* Re: [PATCH] ipv6: Need to export ipv6_push_frag_opts for tunneling now.
From: Craig Gallek @ 2017-05-01 19:31 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20170501.151109.1682060890683033268.davem@davemloft.net>
On Mon, May 1, 2017 at 3:11 PM, David Miller <davem@davemloft.net> wrote:
>
> Since that change also made the nfrag function not necessary
> for exports, remove it.
>
> Fixes: 89a23c8b528b ("ip6_tunnel: Fix missing tunnel encapsulation limit option")
> Signed-off-by: David S. Miller <davem@davemloft.net>
Woops, sorry I missed this. Thanks for the fix!
Acked-by: Craig Gallek <kraig@google.com>
^ permalink raw reply
* Re: How does vlan driver pass vlan info to the h/w ethernet driver
From: carl h @ 2017-05-01 19:35 UTC (permalink / raw)
To: Andrew Lunn; +Cc: David Miller, netdev
In-Reply-To: <20170501192957.GA18265@lunn.ch>
I was afraid you were going to say that.
Thanks anyways Andrew.
On Mon, May 1, 2017 at 3:29 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> On Mon, May 01, 2017 at 02:26:52PM -0400, carl h wrote:
>> It appears that the switchdev driver model was introduced after 2.6.39
>> which is the
>> kernel version that I'm using unfortunately.
>
> We cannot help you much is you are using an ancient kernel. Please
> upgrade.
>
> Andrew
^ permalink raw reply
* Re: more bpf samples build breakage...
From: David Miller @ 2017-05-01 19:44 UTC (permalink / raw)
To: daniel; +Cc: netdev
In-Reply-To: <20170501.153005.983887567095122966.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Mon, 01 May 2017 15:30:05 -0400 (EDT)
>
> Inlcuding bpf_util.h into test_pkt_access.c et al. broke the build even
> more so than it already is on sparc.
>
> The problem is we end up including all the stdio.h bits and eventually
> hit things like:
>
> In file included from /usr/include/stdio.h:933:
> /usr/include/bits/stdio-ldbl.h:28:20: error: cannot apply asm label to function after its first use
> __LDBL_REDIR_DECL (vfprintf)
> ~~~~~~~~~~~~~~~~~~~^~~~~~~~~
> /usr/include/sys/cdefs.h:373:26: note: expanded from macro '__LDBL_REDIR_DECL'
> extern __typeof (name) name __asm (__ASMNAME ("__nldbl_" #name));
>
> So please let's put CLANG compiled helpers into header files
> specifically meant to be included by CLANG compiled BPF programs
> rather than the host build environment.
I'm pushing the following quick fix for this for now:
>From bc1bafbbe9b3558d7789ff151ef4f185b6ad21f3 Mon Sep 17 00:00:00 2001
From: "David S. Miller" <davem@davemloft.net>
Date: Mon, 1 May 2017 12:43:49 -0700
Subject: [PATCH] bpf: Move endianness BPF helpers out of bpf_util.h
We do not want to include things like stdio.h and friends into
eBPF program builds. bpf_util.h is for host compiled programs,
so eBPF C-code helpers don't really belong there.
Add a new bpf_endian.h as a quick fix for this for now.
Signed-off-by: David S. Miller <davem@davemloft.net>
---
tools/testing/selftests/bpf/bpf_endian.h | 23 +++++++++++++++++++++++
tools/testing/selftests/bpf/bpf_util.h | 19 -------------------
tools/testing/selftests/bpf/test_l4lb.c | 2 +-
tools/testing/selftests/bpf/test_pkt_access.c | 2 +-
4 files changed, 25 insertions(+), 21 deletions(-)
create mode 100644 tools/testing/selftests/bpf/bpf_endian.h
diff --git a/tools/testing/selftests/bpf/bpf_endian.h b/tools/testing/selftests/bpf/bpf_endian.h
new file mode 100644
index 0000000..19d0604
--- /dev/null
+++ b/tools/testing/selftests/bpf/bpf_endian.h
@@ -0,0 +1,23 @@
+#ifndef __BPF_ENDIAN__
+#define __BPF_ENDIAN__
+
+#include <asm/byteorder.h>
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# define __bpf_ntohs(x) __builtin_bswap16(x)
+# define __bpf_htons(x) __builtin_bswap16(x)
+#elif __BYTE_ORDER == __BIG_ENDIAN
+# define __bpf_ntohs(x) (x)
+# define __bpf_htons(x) (x)
+#else
+# error "Fix your __BYTE_ORDER?!"
+#endif
+
+#define bpf_htons(x) \
+ (__builtin_constant_p(x) ? \
+ __constant_htons(x) : __bpf_htons(x))
+#define bpf_ntohs(x) \
+ (__builtin_constant_p(x) ? \
+ __constant_ntohs(x) : __bpf_ntohs(x))
+
+#endif
diff --git a/tools/testing/selftests/bpf/bpf_util.h b/tools/testing/selftests/bpf/bpf_util.h
index 369e7d7..20ecbaa 100644
--- a/tools/testing/selftests/bpf/bpf_util.h
+++ b/tools/testing/selftests/bpf/bpf_util.h
@@ -6,25 +6,6 @@
#include <string.h>
#include <errno.h>
-#include <asm/byteorder.h>
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-# define __bpf_ntohs(x) __builtin_bswap16(x)
-# define __bpf_htons(x) __builtin_bswap16(x)
-#elif __BYTE_ORDER == __BIG_ENDIAN
-# define __bpf_ntohs(x) (x)
-# define __bpf_htons(x) (x)
-#else
-# error "Fix your __BYTE_ORDER?!"
-#endif
-
-#define bpf_htons(x) \
- (__builtin_constant_p(x) ? \
- __constant_htons(x) : __bpf_htons(x))
-#define bpf_ntohs(x) \
- (__builtin_constant_p(x) ? \
- __constant_ntohs(x) : __bpf_ntohs(x))
-
static inline unsigned int bpf_num_possible_cpus(void)
{
static const char *fcpu = "/sys/devices/system/cpu/possible";
diff --git a/tools/testing/selftests/bpf/test_l4lb.c b/tools/testing/selftests/bpf/test_l4lb.c
index b68b212..1e10c95 100644
--- a/tools/testing/selftests/bpf/test_l4lb.c
+++ b/tools/testing/selftests/bpf/test_l4lb.c
@@ -19,7 +19,7 @@
#include <linux/udp.h>
#include "bpf_helpers.h"
#include "test_iptunnel_common.h"
-#include "bpf_util.h"
+#include "bpf_endian.h"
int _version SEC("version") = 1;
diff --git a/tools/testing/selftests/bpf/test_pkt_access.c b/tools/testing/selftests/bpf/test_pkt_access.c
index 7113005..39387bb 100644
--- a/tools/testing/selftests/bpf/test_pkt_access.c
+++ b/tools/testing/selftests/bpf/test_pkt_access.c
@@ -14,7 +14,7 @@
#include <linux/tcp.h>
#include <linux/pkt_cls.h>
#include "bpf_helpers.h"
-#include "bpf_util.h"
+#include "bpf_endian.h"
#define barrier() __asm__ __volatile__("": : :"memory")
int _version SEC("version") = 1;
--
2.1.2.532.g19b5d50
^ permalink raw reply related
* [PATCH v2 net-next] rhashtable: compact struct rhashtable_params
From: Florian Westphal @ 2017-05-01 20:18 UTC (permalink / raw)
To: netdev; +Cc: Florian Westphal
By using smaller datatypes this (rather large) struct shrinks considerably
(80 -> 48 bytes on x86_64).
As this is embedded in other structs, this also rerduces size of several
others, e.g. cls_fl_head or nft_hash.
Signed-off-by: Florian Westphal <fw@strlen.de>
---
changes since v1: rebase on top of net-next master
David, if its too late, just mark this as deferred in patchwork
and I'll resubmit when net-next reopens.
include/linux/rhashtable.h | 18 +++++++++---------
lib/rhashtable.c | 2 +-
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h
index 45f89369c4c8..7d56a7ea2b2e 100644
--- a/include/linux/rhashtable.h
+++ b/include/linux/rhashtable.h
@@ -127,23 +127,23 @@ struct rhashtable;
* @head_offset: Offset of rhash_head in struct to be hashed
* @max_size: Maximum size while expanding
* @min_size: Minimum size while shrinking
- * @nulls_base: Base value to generate nulls marker
- * @automatic_shrinking: Enable automatic shrinking of tables
* @locks_mul: Number of bucket locks to allocate per cpu (default: 128)
+ * @automatic_shrinking: Enable automatic shrinking of tables
+ * @nulls_base: Base value to generate nulls marker
* @hashfn: Hash function (default: jhash2 if !(key_len % 4), or jhash)
* @obj_hashfn: Function to hash object
* @obj_cmpfn: Function to compare key with object
*/
struct rhashtable_params {
- size_t nelem_hint;
- size_t key_len;
- size_t key_offset;
- size_t head_offset;
+ u16 nelem_hint;
+ u16 key_len;
+ u16 key_offset;
+ u16 head_offset;
unsigned int max_size;
- unsigned int min_size;
- u32 nulls_base;
+ u16 min_size;
bool automatic_shrinking;
- size_t locks_mul;
+ u8 locks_mul;
+ u32 nulls_base;
rht_hashfn_t hashfn;
rht_obj_hashfn_t obj_hashfn;
rht_obj_cmpfn_t obj_cmpfn;
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index 3895486ef551..a930e436db5d 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -967,7 +967,7 @@ int rhashtable_init(struct rhashtable *ht,
ht->max_elems = ht->p.max_size * 2;
}
- ht->p.min_size = max(ht->p.min_size, HASH_MIN_SIZE);
+ ht->p.min_size = max_t(u16, ht->p.min_size, HASH_MIN_SIZE);
if (params->nelem_hint)
size = rounded_hashtable_size(&ht->p);
--
2.10.2
^ 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