* [PATCH net-next 0/3] s390/qeth: updates 2021-03-18
@ 2021-03-18 18:54 Julian Wiedmann
2021-03-18 18:54 ` [PATCH net-next 1/3] s390/qeth: allocate initial TX Buffer structs with GFP_KERNEL Julian Wiedmann
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Julian Wiedmann @ 2021-03-18 18:54 UTC (permalink / raw)
To: David Miller, Jakub Kicinski
Cc: linux-netdev, linux-s390, Heiko Carstens, Karsten Graul,
Julian Wiedmann
Hi Dave & Jakub,
please apply the following patch series for qeth to netdev's net-next
tree.
This brings two small optimizations (replace a hard-coded GFP_ATOMIC,
pass through the NAPI budget to enable napi_consume_skb()), and removes
some redundant VLAN filter code.
Thanks,
Julian
Julian Wiedmann (3):
s390/qeth: allocate initial TX Buffer structs with GFP_KERNEL
s390/qeth: enable napi_consume_skb() for pending TX buffers
s390/qeth: remove RX VLAN filter stubs in L3 driver
drivers/s390/net/qeth_core_main.c | 18 ++++++++++--------
drivers/s390/net/qeth_l3_main.c | 25 +------------------------
2 files changed, 11 insertions(+), 32 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net-next 1/3] s390/qeth: allocate initial TX Buffer structs with GFP_KERNEL
2021-03-18 18:54 [PATCH net-next 0/3] s390/qeth: updates 2021-03-18 Julian Wiedmann
@ 2021-03-18 18:54 ` Julian Wiedmann
2021-03-18 18:54 ` [PATCH net-next 2/3] s390/qeth: enable napi_consume_skb() for pending TX buffers Julian Wiedmann
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Julian Wiedmann @ 2021-03-18 18:54 UTC (permalink / raw)
To: David Miller, Jakub Kicinski
Cc: linux-netdev, linux-s390, Heiko Carstens, Karsten Graul,
Julian Wiedmann
qeth_init_qdio_out_buf() is typically called during initialization, and
the GFP_ATOMIC is only needed for a very specific & rare case during TX
completion.
Allow callers to specify a gfp mask, so that the initialization path can
select GFP_KERNEL. While at it also clarify the function name.
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
drivers/s390/net/qeth_core_main.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index a814698387bc..abd1e49cf97a 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -2590,11 +2590,12 @@ static int qeth_ulp_setup(struct qeth_card *card)
return qeth_send_control_data(card, iob, qeth_ulp_setup_cb, NULL);
}
-static int qeth_init_qdio_out_buf(struct qeth_qdio_out_q *q, int bidx)
+static int qeth_alloc_out_buf(struct qeth_qdio_out_q *q, unsigned int bidx,
+ gfp_t gfp)
{
struct qeth_qdio_out_buffer *newbuf;
- newbuf = kmem_cache_zalloc(qeth_qdio_outbuf_cache, GFP_ATOMIC);
+ newbuf = kmem_cache_zalloc(qeth_qdio_outbuf_cache, gfp);
if (!newbuf)
return -ENOMEM;
@@ -2629,7 +2630,7 @@ static struct qeth_qdio_out_q *qeth_alloc_output_queue(void)
goto err_qdio_bufs;
for (i = 0; i < QDIO_MAX_BUFFERS_PER_Q; i++) {
- if (qeth_init_qdio_out_buf(q, i))
+ if (qeth_alloc_out_buf(q, i, GFP_KERNEL))
goto err_out_bufs;
}
@@ -6088,7 +6089,8 @@ static void qeth_iqd_tx_complete(struct qeth_qdio_out_q *queue,
/* Prepare the queue slot for immediate re-use: */
qeth_scrub_qdio_buffer(buffer->buffer, queue->max_elements);
- if (qeth_init_qdio_out_buf(queue, bidx)) {
+ if (qeth_alloc_out_buf(queue, bidx,
+ GFP_ATOMIC)) {
QETH_CARD_TEXT(card, 2, "outofbuf");
qeth_schedule_recovery(card);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net-next 2/3] s390/qeth: enable napi_consume_skb() for pending TX buffers
2021-03-18 18:54 [PATCH net-next 0/3] s390/qeth: updates 2021-03-18 Julian Wiedmann
2021-03-18 18:54 ` [PATCH net-next 1/3] s390/qeth: allocate initial TX Buffer structs with GFP_KERNEL Julian Wiedmann
@ 2021-03-18 18:54 ` Julian Wiedmann
2021-03-18 18:54 ` [PATCH net-next 3/3] s390/qeth: remove RX VLAN filter stubs in L3 driver Julian Wiedmann
2021-03-18 23:30 ` [PATCH net-next 0/3] s390/qeth: updates 2021-03-18 patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Julian Wiedmann @ 2021-03-18 18:54 UTC (permalink / raw)
To: David Miller, Jakub Kicinski
Cc: linux-netdev, linux-s390, Heiko Carstens, Karsten Graul,
Julian Wiedmann
Pending TX buffers are completed from the same NAPI code as normal
TX buffers. Pass the NAPI budget to qeth_tx_complete_buf() so that
the freeing of the completed skbs can be deferred.
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
drivers/s390/net/qeth_core_main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index abd1e49cf97a..6954d4e831a3 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -1453,7 +1453,7 @@ static void qeth_clear_output_buffer(struct qeth_qdio_out_q *queue,
static void qeth_tx_complete_pending_bufs(struct qeth_card *card,
struct qeth_qdio_out_q *queue,
- bool drain)
+ bool drain, int budget)
{
struct qeth_qdio_out_buffer *buf, *tmp;
@@ -1465,7 +1465,7 @@ static void qeth_tx_complete_pending_bufs(struct qeth_card *card,
if (drain)
qeth_notify_skbs(queue, buf,
TX_NOTIFY_GENERALERROR);
- qeth_tx_complete_buf(buf, drain, 0);
+ qeth_tx_complete_buf(buf, drain, budget);
list_del(&buf->list_entry);
kmem_cache_free(qeth_qdio_outbuf_cache, buf);
@@ -1477,7 +1477,7 @@ static void qeth_drain_output_queue(struct qeth_qdio_out_q *q, bool free)
{
int j;
- qeth_tx_complete_pending_bufs(q->card, q, true);
+ qeth_tx_complete_pending_bufs(q->card, q, true, 0);
for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j) {
if (!q->bufs[j])
@@ -6152,7 +6152,7 @@ static int qeth_tx_poll(struct napi_struct *napi, int budget)
unsigned int bytes = 0;
int completed;
- qeth_tx_complete_pending_bufs(card, queue, false);
+ qeth_tx_complete_pending_bufs(card, queue, false, budget);
if (qeth_out_queue_is_empty(queue)) {
napi_complete(napi);
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net-next 3/3] s390/qeth: remove RX VLAN filter stubs in L3 driver
2021-03-18 18:54 [PATCH net-next 0/3] s390/qeth: updates 2021-03-18 Julian Wiedmann
2021-03-18 18:54 ` [PATCH net-next 1/3] s390/qeth: allocate initial TX Buffer structs with GFP_KERNEL Julian Wiedmann
2021-03-18 18:54 ` [PATCH net-next 2/3] s390/qeth: enable napi_consume_skb() for pending TX buffers Julian Wiedmann
@ 2021-03-18 18:54 ` Julian Wiedmann
2021-03-18 23:30 ` [PATCH net-next 0/3] s390/qeth: updates 2021-03-18 patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Julian Wiedmann @ 2021-03-18 18:54 UTC (permalink / raw)
To: David Miller, Jakub Kicinski
Cc: linux-netdev, linux-s390, Heiko Carstens, Karsten Graul,
Julian Wiedmann
The callbacks have been slimmed down to a level where they no longer do
any actual work. So stop pretending that we support the
NETIF_F_HW_VLAN_CTAG_FILTER feature.
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
drivers/s390/net/qeth_l3_main.c | 25 +------------------------
1 file changed, 1 insertion(+), 24 deletions(-)
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index dd441eaec66e..35b42275a06c 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -1123,24 +1123,6 @@ static int qeth_l3_add_mcast_rtnl(struct net_device *dev, int vid, void *arg)
return 0;
}
-static int qeth_l3_vlan_rx_add_vid(struct net_device *dev,
- __be16 proto, u16 vid)
-{
- struct qeth_card *card = dev->ml_priv;
-
- QETH_CARD_TEXT_(card, 4, "aid:%d", vid);
- return 0;
-}
-
-static int qeth_l3_vlan_rx_kill_vid(struct net_device *dev,
- __be16 proto, u16 vid)
-{
- struct qeth_card *card = dev->ml_priv;
-
- QETH_CARD_TEXT_(card, 4, "kid:%d", vid);
- return 0;
-}
-
static void qeth_l3_set_promisc_mode(struct qeth_card *card)
{
bool enable = card->dev->flags & IFF_PROMISC;
@@ -1861,8 +1843,6 @@ static const struct net_device_ops qeth_l3_netdev_ops = {
.ndo_do_ioctl = qeth_do_ioctl,
.ndo_fix_features = qeth_fix_features,
.ndo_set_features = qeth_set_features,
- .ndo_vlan_rx_add_vid = qeth_l3_vlan_rx_add_vid,
- .ndo_vlan_rx_kill_vid = qeth_l3_vlan_rx_kill_vid,
.ndo_tx_timeout = qeth_tx_timeout,
};
@@ -1878,8 +1858,6 @@ static const struct net_device_ops qeth_l3_osa_netdev_ops = {
.ndo_do_ioctl = qeth_do_ioctl,
.ndo_fix_features = qeth_fix_features,
.ndo_set_features = qeth_set_features,
- .ndo_vlan_rx_add_vid = qeth_l3_vlan_rx_add_vid,
- .ndo_vlan_rx_kill_vid = qeth_l3_vlan_rx_kill_vid,
.ndo_tx_timeout = qeth_tx_timeout,
.ndo_neigh_setup = qeth_l3_neigh_setup,
};
@@ -1933,8 +1911,7 @@ static int qeth_l3_setup_netdev(struct qeth_card *card)
card->dev->needed_headroom = headroom;
card->dev->features |= NETIF_F_HW_VLAN_CTAG_TX |
- NETIF_F_HW_VLAN_CTAG_RX |
- NETIF_F_HW_VLAN_CTAG_FILTER;
+ NETIF_F_HW_VLAN_CTAG_RX;
netif_keep_dst(card->dev);
if (card->dev->hw_features & (NETIF_F_TSO | NETIF_F_TSO6))
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next 0/3] s390/qeth: updates 2021-03-18
2021-03-18 18:54 [PATCH net-next 0/3] s390/qeth: updates 2021-03-18 Julian Wiedmann
` (2 preceding siblings ...)
2021-03-18 18:54 ` [PATCH net-next 3/3] s390/qeth: remove RX VLAN filter stubs in L3 driver Julian Wiedmann
@ 2021-03-18 23:30 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-18 23:30 UTC (permalink / raw)
To: Julian Wiedmann; +Cc: davem, kuba, netdev, linux-s390, hca, kgraul
Hello:
This series was applied to netdev/net-next.git (refs/heads/master):
On Thu, 18 Mar 2021 19:54:53 +0100 you wrote:
> Hi Dave & Jakub,
>
> please apply the following patch series for qeth to netdev's net-next
> tree.
>
> This brings two small optimizations (replace a hard-coded GFP_ATOMIC,
> pass through the NAPI budget to enable napi_consume_skb()), and removes
> some redundant VLAN filter code.
>
> [...]
Here is the summary with links:
- [net-next,1/3] s390/qeth: allocate initial TX Buffer structs with GFP_KERNEL
https://git.kernel.org/netdev/net-next/c/e47ded97f972
- [net-next,2/3] s390/qeth: enable napi_consume_skb() for pending TX buffers
https://git.kernel.org/netdev/net-next/c/ad4bbd7285ad
- [net-next,3/3] s390/qeth: remove RX VLAN filter stubs in L3 driver
https://git.kernel.org/netdev/net-next/c/d96a8c693d0a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-03-18 23:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-18 18:54 [PATCH net-next 0/3] s390/qeth: updates 2021-03-18 Julian Wiedmann
2021-03-18 18:54 ` [PATCH net-next 1/3] s390/qeth: allocate initial TX Buffer structs with GFP_KERNEL Julian Wiedmann
2021-03-18 18:54 ` [PATCH net-next 2/3] s390/qeth: enable napi_consume_skb() for pending TX buffers Julian Wiedmann
2021-03-18 18:54 ` [PATCH net-next 3/3] s390/qeth: remove RX VLAN filter stubs in L3 driver Julian Wiedmann
2021-03-18 23:30 ` [PATCH net-next 0/3] s390/qeth: updates 2021-03-18 patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).