s390/qeth: updates 2019-08-23
Subsystems (5)
cover s390/qeth: updates 2019-08-23
Hi Dave,
please apply one more round of qeth patches. These implement support for a bunch of TX-related features - namely TX NAPI, BQL and xmit_more.
Note that this includes two qdio patches which lay the necessary groundwork, and have been acked by Vasily.
Thanks,
Julian
Julian Wiedmann (7):
s390/qdio: enable drivers to poll for Output completions s390/qdio: let drivers opt-out from Output Queue scanning s390/qeth: collect accurate TX statistics s390/qeth: add TX NAPI support for IQD devices s390/qeth: when in TX NAPI mode, use napi_consume_skb() s390/qeth: add BQL support for IQD devices s390/qeth: add xmit_more support for IQD devices
arch/s390/include/asm/qdio.h | 6 +- drivers/s390/cio/qdio.h | 3 +- drivers/s390/cio/qdio_main.c | 75 ++++-- drivers/s390/cio/qdio_setup.c | 2 +- drivers/s390/net/qeth_core.h | 52 ++++ drivers/s390/net/qeth_core_main.c | 410 +++++++++++++++++++++--------- drivers/s390/net/qeth_ethtool.c | 2 + drivers/s390/net/qeth_l2_main.c | 12 +- drivers/s390/net/qeth_l3_main.c | 9 +- 9 files changed, 414 insertions(+), 157 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/7 s390/qdio: enable drivers to poll for Output completions
While commit d36deae75011 ("qdio: extend API to allow polling") enhanced the qdio layer so that drivers can poll their Input Queues, we don't have the corresponding infrastructure for Output Queues yet.
Factor out a helper that scans a single QDIO Queue, so that qeth can implement TX NAPI on top of it.
While doing so, remove the duplicated tracking of the next-to-scan index (q->first_to_check vs q->first_to_kick) in this code path.
qdio_handle_aobs() needs to move slightly upwards in the code hierarchy, so that it's still called from the polling path.
--- arch/s390/include/asm/qdio.h | 3 ++ drivers/s390/cio/qdio_main.c | 64 ++++++++++++++++++++++++------------ 2 files changed, 46 insertions(+), 21 deletions(-)
arch/s390/include/asm/qdio.h +3 -0
@@ -416,6 +416,9 @@ extern int do_QDIO(struct ccw_device *, unsigned int, int, unsigned int,extern int qdio_start_irq (struct ccw_device *,int );extern int qdio_stop_irq (struct ccw_device *,int );extern int qdio_get_next_buffers (struct ccw_device *,int ,int *,int *); +extern int qdio_inspect_queue (struct ccw_device *cdev,unsigned int nr, +bool is_input,unsigned int *bufnr, +unsigned int *error);extern int qdio_shutdown (struct ccw_device *,int );extern int qdio_free (struct ccw_device *);extern int qdio_get_ssqd_desc (struct ccw_device *,struct qdio_ssqd_desc *);
drivers/s390/cio/qdio_main.c +43 -21
103 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 2/7 s390/qdio: let drivers opt-out from Output Queue scanning
In reply to Julian WiedmannIf a driver wants to use the new Output Queue poll code, then the qdio layer must disable its internal Queue scanning. Let the driver select this mode by passing a special scan_threshold of 0.
As the scan_threshold is the same for all Output Queues, also move it into the main qdio_irq struct. This allows for fast opt-out checking, a driver is expected to operate either _all_ or none of its Output Queues in polling mode.
--- arch/s390/include/asm/qdio.h | 2 +- drivers/s390/cio/qdio.h | 3 +-- drivers/s390/cio/qdio_main.c | 11 ++++++++--- drivers/s390/cio/qdio_setup.c | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-)
arch/s390/include/asm/qdio.h +1 -1
@@ -359,7 +359,7 @@ struct qdio_initialize {qdio_handler_t *output_handler;void (**queue_start_poll_array) (struct ccw_device *,int ,unsigned long ); -int scan_threshold; +unsigned int scan_threshold;unsigned long int_parm;struct qdio_buffer **input_sbal_addr_array;struct qdio_buffer **output_sbal_addr_array;
drivers/s390/cio/qdio.h +1 -2
@@ -206,8 +206,6 @@ struct qdio_output_q {struct qdio_outbuf_state *sbal_state;/* timer to check for more outbound work */ struct timer_list timer; -/* used SBALs before tasklet schedule */ -int scan_threshold; };/*
@@ -295,6 +293,7 @@ struct qdio_irq {struct qdio_ssqd_desc ssqd_desc;void (*orig_handler) (struct ccw_device *,unsigned long ,struct irb *); +unsigned int scan_threshold;/* used SBALs before tasklet schedule */ int perf_stat_enabled;struct qdr *qdr;
drivers/s390/cio/qdio_main.c +8 -3
@@ -880,7 +880,7 @@ static inline void qdio_check_outbound_pci_queues(struct qdio_irq *irq)struct qdio_q *out;int i; -if (!pci_out_supported (irq)) +if (!pci_out_supported (irq) || !irq->scan_threshold)return ;for_each_output_queue (irq, out, i)
@@ -973,7 +973,7 @@ static void qdio_int_handler_pci(struct qdio_irq *irq_ptr) } } -if (!pci_out_supported (irq_ptr)) +if (!pci_out_supported (irq_ptr) || !irq_ptr->scan_threshold)return ;for_each_output_queue (irq_ptr, q, i) {
@@ -1528,6 +1528,7 @@ static int handle_inbound(struct qdio_q *q, unsigned int callflags,static int handle_outbound (struct qdio_q *q,unsigned int callflags,int bufnr,int count) { +const unsigned int scan_threshold = q->irq_ptr->scan_threshold;unsigned char state =0 ;int used, rc =0 ;
@@ -1566,8 +1567,12 @@ static int handle_outbound(struct qdio_q *q, unsigned int callflags, rc =qdio_kick_outbound_q (q,0 ); } +/* Let drivers implement their own completion scanning: */ +if (!scan_threshold) +return rc; +/* in case of SIGA errors we must process the error immediately */ -if (used >= q->u.out.scan_threshold || rc) +if (used >= scan_threshold || rc)qdio_tasklet_schedule (q);else /* free the SBALs in case of no further traffic */
drivers/s390/cio/qdio_setup.c +1 -1
@@ -248,7 +248,6 @@ static void setup_queues(struct qdio_irq *irq_ptr, output_sbal_state_array +=QDIO_MAX_BUFFERS_PER_Q ; q->is_input_q =0 ; - q->u.out.scan_threshold = qdio_init->scan_threshold;setup_storage_lists (q, irq_ptr, output_sbal_array, i); output_sbal_array +=QDIO_MAX_BUFFERS_PER_Q ;
@@ -474,6 +473,7 @@ int qdio_setup_irq(struct qdio_initialize *init_data) irq_ptr->nr_input_qs = init_data->no_input_qs; irq_ptr->nr_output_qs = init_data->no_output_qs; irq_ptr->cdev = init_data->cdev; + irq_ptr->scan_threshold = init_data->scan_threshold;ccw_device_get_schid (irq_ptr->cdev, &irq_ptr->schid);setup_queues (irq_ptr, init_data);
Signature · 1 line
2.17.1
PATCH 3/7 s390/qeth: collect accurate TX statistics
In reply to Julian WiedmannThis consolidates the SW statistics code, and improves it to
(1) account for the header overhead of each segment on a TSO skb,
(2) count dangling packets as in-error (during eg. shutdown), and
(3) only count offloads when the skb was successfully transmitted.
We also count each segment of an TSO skb as one packet - except for tx_dropped, to be consistent with dev->tx_dropped.
--- drivers/s390/net/qeth_core.h | 1 + drivers/s390/net/qeth_core_main.c | 66 +++++++++++++++++++------------ drivers/s390/net/qeth_l2_main.c | 12 ++---- drivers/s390/net/qeth_l3_main.c | 9 ++--- 4 files changed, 49 insertions(+), 39 deletions(-)
drivers/s390/net/qeth_core.h +1 -0
@@ -30,6 +30,7 @@#include <net/ipv6.h> #include <net/if_inet6.h> #include <net/addrconf.h> +#include <net/sch_generic.h> #include <net/tcp.h> #include <asm/debug.h>
drivers/s390/net/qeth_core_main.c +41 -25
144 lines not on this page · raw message
drivers/s390/net/qeth_l2_main.c +4 -8
@@ -175,10 +175,8 @@ static void qeth_l2_fill_header(struct qeth_qdio_out_q *queue, hdr->hdr.l2.id =QETH_HEADER_TYPE_L2_TSO ; }else { hdr->hdr.l2.id =QETH_HEADER_TYPE_LAYER2 ; -if (skb->ip_summed ==CHECKSUM_PARTIAL ) { +if (skb->ip_summed ==CHECKSUM_PARTIAL )qeth_tx_csum (skb, &hdr->hdr.l2.flags[1 ], ipv); -QETH_TXQ_STAT_INC (queue, skbs_csum); - } }/* set byte byte 3 to casting flags */
@@ -588,9 +586,10 @@ static netdev_tx_t qeth_l2_hard_start_xmit(struct sk_buff *skb,struct qeth_card *card = dev->ml_priv;u16 txq =skb_get_queue_mapping (skb);struct qeth_qdio_out_q *queue; -int tx_bytes = skb->len;int rc; +if (!skb_is_gso (skb)) +qdisc_skb_cb (skb)->pkt_len = skb->len;if (IS_IQD (card)) txq =qeth_iqd_translate_txq (dev, txq); queue = card->qdio.out_qs[txq];
@@ -601,11 +600,8 @@ static netdev_tx_t qeth_l2_hard_start_xmit(struct sk_buff *skb, rc =qeth_xmit (card, skb, queue,qeth_get_ip_version (skb), qeth_l2_fill_header); -if (!rc) { -QETH_TXQ_STAT_INC (queue, tx_packets); -QETH_TXQ_STAT_ADD (queue, tx_bytes, tx_bytes); +if (!rc)return NETDEV_TX_OK ; - }QETH_TXQ_STAT_INC (queue, tx_dropped);kfree_skb (skb);
drivers/s390/net/qeth_l3_main.c +3 -6
@@ -1957,7 +1957,6 @@ static void qeth_l3_fill_header(struct qeth_qdio_out_q *queue,/* some HW requires combined L3+L4 csum offload: */ if (ipv ==4 ) hdr->hdr.l3.ext_flags |=QETH_HDR_EXT_CSUM_HDR_REQ ; -QETH_TXQ_STAT_INC (queue, skbs_csum); } }
@@ -2044,9 +2043,10 @@ static netdev_tx_t qeth_l3_hard_start_xmit(struct sk_buff *skb,u16 txq =skb_get_queue_mapping (skb);int ipv =qeth_get_ip_version (skb);struct qeth_qdio_out_q *queue; -int tx_bytes = skb->len;int rc; +if (!skb_is_gso (skb)) +qdisc_skb_cb (skb)->pkt_len = skb->len;if (IS_IQD (card)) { queue = card->qdio.out_qs[qeth_iqd_translate_txq (dev, txq)];
@@ -2069,11 +2069,8 @@ static netdev_tx_t qeth_l3_hard_start_xmit(struct sk_buff *skb,else rc =qeth_xmit (card, skb, queue, ipv, qeth_l3_fill_header); -if (!rc) { -QETH_TXQ_STAT_INC (queue, tx_packets); -QETH_TXQ_STAT_ADD (queue, tx_bytes, tx_bytes); +if (!rc)return NETDEV_TX_OK ; - } tx_drop:QETH_TXQ_STAT_INC (queue, tx_dropped);
Signature · 1 line
2.17.1
PATCH 4/7 s390/qeth: add TX NAPI support for IQD devices
In reply to Julian WiedmannDue to their large MTU and potentially low utilization of TX buffers, IQD devices in particular require fast TX recycling. This makes them a prime candidate for a TX NAPI path in qeth.
qeth_tx_poll() uses the recently introduced qdio_inspect_queue() helper to poll the TX queue for completed buffers. To avoid hogging the CPU for too long, we yield to the stack after completing an entire queue's worth of buffers.
While IQD is expected to transfer its buffers synchronously (and thus doesn't support TX interrupts), a timer covers for the odd case where a TX buffer doesn't complete synchronously. Currently this timer should only ever fire for
(1) the mcast queue,
(2) the occasional race, where the NAPI poll code observes an update to
queue->used_buffers while the TX doorbell hasn't been issued yet.
--- arch/s390/include/asm/qdio.h | 1 + drivers/s390/net/qeth_core.h | 26 ++++ drivers/s390/net/qeth_core_main.c | 202 +++++++++++++++++++++++------- drivers/s390/net/qeth_ethtool.c | 2 + 4 files changed, 183 insertions(+), 48 deletions(-)
arch/s390/include/asm/qdio.h +1 -0
@@ -16,6 +16,7 @@#define QDIO_MAX_QUEUES_PER_IRQ 4#define QDIO_MAX_BUFFERS_PER_Q 128#define QDIO_MAX_BUFFERS_MASK (QDIO_MAX_BUFFERS_PER_Q - 1) +#define QDIO_BUFNR (num) ((num) & QDIO_MAX_BUFFERS_MASK)#define QDIO_MAX_ELEMENTS_PER_BUFFER 16#define QDIO_SBAL_SIZE 256
drivers/s390/net/qeth_core.h +26 -0
@@ -22,6 +22,7 @@#include <linux/hashtable.h> #include <linux/ip.h> #include <linux/refcount.h> +#include <linux/timer.h> #include <linux/wait.h> #include <linux/workqueue.h>
@@ -474,6 +475,8 @@ struct qeth_out_q_stats {u64 tso_bytes;u64 packing_mode_switch;u64 stopped; +u64 completion_yield; +u64 completion_timer;/* rtnl_link_stats64 */ u64 tx_packets;
@@ -482,6 +485,8 @@ struct qeth_out_q_stats {u64 tx_dropped; }; +#define QETH_TX_TIMER_USECS 500 +struct qeth_qdio_out_q {struct qdio_buffer *qdio_bufs[QDIO_MAX_BUFFERS_PER_Q ];struct qeth_qdio_out_buffer *bufs[QDIO_MAX_BUFFERS_PER_Q ];
@@ -500,13 +505,34 @@ struct qeth_qdio_out_q {atomic_t used_buffers;/* indicates whether PCI flag must be set (or if one is outstanding) */ atomic_t set_pci_flags_count; +struct napi_struct napi; +struct timer_list timer; }; +#define qeth_for_each_output_queue (card, q, i) \ + for (i = 0; i < card->qdio.no_out_queues && \ + (q = card->qdio.out_qs[i]); i++) + +#define qeth_napi_to_out_queue (n) container_of(n, struct qeth_qdio_out_q, napi) + +static inline void qeth_tx_arm_timer (struct qeth_qdio_out_q *queue) +{ +if (timer_pending (&queue->timer)) +return ; +mod_timer (&queue->timer,usecs_to_jiffies (QETH_TX_TIMER_USECS ) + + jiffies); +} +static inline bool qeth_out_queue_is_full (struct qeth_qdio_out_q *queue) {return atomic_read (&queue->used_buffers) >=QDIO_MAX_BUFFERS_PER_Q ; } +static inline bool qeth_out_queue_is_empty (struct qeth_qdio_out_q *queue) +{ +return atomic_read (&queue->used_buffers) ==0 ; +} +struct qeth_qdio_info {atomic_t state;/* input */
drivers/s390/net/qeth_core_main.c +154 -48
263 lines not on this page · raw message
drivers/s390/net/qeth_ethtool.c +2 -0
@@ -39,6 +39,8 @@ static const struct qeth_stats txq_stats[] = {QETH_TXQ_STAT ("TSO bytes" , tso_bytes),QETH_TXQ_STAT ("Packing mode switches" , packing_mode_switch),QETH_TXQ_STAT ("Queue stopped" , stopped), +QETH_TXQ_STAT ("Completion yield" , completion_yield), + QETH_TXQ_STAT("Completion timer", completion_timer), }; static const struct qeth_stats card_stats[] = {
Signature · 1 line
2.17.1
PATCH 5/7 s390/qeth: when in TX NAPI mode, use napi_consume_skb()
In reply to Julian WiedmannThis allows the stack to bulk-free our TX-completed skbs.
--- drivers/s390/net/qeth_core_main.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-)
drivers/s390/net/qeth_core_main.c +13 -11
@@ -71,7 +71,8 @@ static void qeth_free_qdio_queues(struct qeth_card *card);static void qeth_notify_skbs (struct qeth_qdio_out_q *queue,struct qeth_qdio_out_buffer *buf,enum iucv_tx_notify notification); -static void qeth_tx_complete_buf (struct qeth_qdio_out_buffer *buf,bool error); +static void qeth_tx_complete_buf (struct qeth_qdio_out_buffer *buf,bool error, +int budget);static int qeth_init_qdio_out_buf (struct qeth_qdio_out_q *,int );static void qeth_close_dev_handler (struct work_struct *work)
@@ -411,7 +412,7 @@ static void qeth_cleanup_handled_pending(struct qeth_qdio_out_q *q, int bidx,/* release here to avoid interleaving between outbound tasklet and inbound tasklet regarding notifications and lifecycle */ -qeth_tx_complete_buf (c, forced_cleanup); +qeth_tx_complete_buf (c, forced_cleanup,0 ); c = f->next_pending;WARN_ON_ONCE (head->next_pending != f);
@@ -1077,7 +1078,8 @@ static void qeth_notify_skbs(struct qeth_qdio_out_q *q, } } -static void qeth_tx_complete_buf (struct qeth_qdio_out_buffer *buf,bool error) +static void qeth_tx_complete_buf (struct qeth_qdio_out_buffer *buf,bool error, +int budget) {struct qeth_qdio_out_q *queue = buf->q;struct sk_buff *skb;
@@ -1115,13 +1117,13 @@ static void qeth_tx_complete_buf(struct qeth_qdio_out_buffer *buf, bool error) } } -consume_skb (skb); +napi_consume_skb (skb, budget); } }static void qeth_clear_output_buffer (struct qeth_qdio_out_q *queue,struct qeth_qdio_out_buffer *buf, -bool error) +bool error,int budget) {int i;
@@ -1129,7 +1131,7 @@ static void qeth_clear_output_buffer(struct qeth_qdio_out_q *queue,if (buf->buffer->element[0 ].sflags &SBAL_SFLAGS0_PCI_REQ )atomic_dec (&queue->set_pci_flags_count); -qeth_tx_complete_buf (buf, error); +qeth_tx_complete_buf (buf, error, budget);for (i =0 ; i < queue->max_elements; ++i) {if (buf->buffer->element[i].addr && buf->is_header[i])
@@ -1151,7 +1153,7 @@ static void qeth_drain_output_queue(struct qeth_qdio_out_q *q, bool free)if (!q->bufs[j])continue ;qeth_cleanup_handled_pending (q, j,1 ); -qeth_clear_output_buffer (q, q->bufs[j], true); +qeth_clear_output_buffer (q, q->bufs[j], true,0 );if (free) {kmem_cache_free (qeth_qdio_outbuf_cache, q->bufs[j]); q->bufs[j] =NULL ;
@@ -3471,7 +3473,7 @@ static void qeth_qdio_output_handler(struct ccw_device *ccwdev,int bidx = i %QDIO_MAX_BUFFERS_PER_Q ; buffer = queue->bufs[bidx];qeth_handle_send_error (card, buffer, qdio_error); -qeth_clear_output_buffer (queue, buffer, qdio_error); +qeth_clear_output_buffer (queue, buffer, qdio_error,0 ); }atomic_sub (count, &queue->used_buffers);
@@ -5138,7 +5140,7 @@ int qeth_poll(struct napi_struct *napi, int budget)EXPORT_SYMBOL_GPL (qeth_poll);static void qeth_iqd_tx_complete (struct qeth_qdio_out_q *queue, -unsigned int bidx,bool error) +unsigned int bidx,bool error,int budget) {struct qeth_qdio_out_buffer *buffer = queue->bufs[bidx];u8 sflags = buffer->buffer->element[15 ].sflags;
@@ -5168,7 +5170,7 @@ static void qeth_iqd_tx_complete(struct qeth_qdio_out_q *queue,if (card->options.cq ==QETH_CQ_ENABLED )qeth_notify_skbs (queue, buffer,qeth_compute_cq_notification (sflags,0 )); -qeth_clear_output_buffer (queue, buffer, error); +qeth_clear_output_buffer (queue, buffer, error, budget); }static int qeth_tx_poll (struct napi_struct *napi,int budget)
@@ -5212,7 +5214,7 @@ static int qeth_tx_poll(struct napi_struct *napi, int budget)unsigned int bidx =QDIO_BUFNR (i);qeth_handle_send_error (card, queue->bufs[bidx], error); -qeth_iqd_tx_complete (queue, bidx, error); +qeth_iqd_tx_complete (queue, bidx, error, budget);qeth_cleanup_handled_pending (queue, bidx, false); }
Signature · 1 line
2.17.1
PATCH 6/7 s390/qeth: add BQL support for IQD devices
In reply to Julian WiedmannEach TX buffer may contain multiple skbs. So just accumulate the sent byte count in the buffer struct, and later use the same count when completing the buffer.
--- drivers/s390/net/qeth_core.h | 1 + drivers/s390/net/qeth_core_main.c | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-)
drivers/s390/net/qeth_core.h +1 -0
@@ -426,6 +426,7 @@ struct qeth_qdio_out_buffer {struct qdio_buffer *buffer;atomic_t state;int next_element_to_fill; +unsigned int bytes;struct sk_buff_head skb_list;int is_header[QDIO_MAX_ELEMENTS_PER_BUFFER ];
drivers/s390/net/qeth_core_main.c +15 -1
@@ -1142,6 +1142,7 @@ static void qeth_clear_output_buffer(struct qeth_qdio_out_q *queue,qeth_scrub_qdio_buffer (buf->buffer, queue->max_elements); buf->next_element_to_fill =0 ; + buf->bytes =0 ;atomic_set (&buf->state,QETH_QDIO_BUF_EMPTY ); }
@@ -2673,6 +2674,7 @@ int qeth_init_qdio_queues(struct qeth_card *card)atomic_set (&queue->used_buffers,0 );atomic_set (&queue->set_pci_flags_count,0 );atomic_set (&queue->state,QETH_OUT_Q_UNLOCKED ); +netdev_tx_reset_queue (netdev_get_tx_queue (card->dev, i)); }return 0 ; }
@@ -3790,6 +3792,7 @@ static int qeth_do_send_packet_fast(struct qeth_qdio_out_q *queue, {int index = queue->next_buf_to_fill;struct qeth_qdio_out_buffer *buffer = queue->bufs[index]; +unsigned int bytes =qdisc_pkt_len (skb);struct netdev_queue *txq;bool stopped = false;
@@ -3811,6 +3814,9 @@ static int qeth_do_send_packet_fast(struct qeth_qdio_out_q *queue, }qeth_fill_buffer (queue, buffer, skb, hdr, offset, hd_len, stopped); +netdev_tx_sent_queue (txq, bytes); + buffer->bytes += bytes; +qeth_flush_buffers (queue, index,1 );if (stopped && !qeth_out_queue_is_full (queue))
@@ -5186,6 +5192,8 @@ static int qeth_tx_poll(struct napi_struct *napi, int budget)while (1 ) {unsigned int start, error, i; +unsigned int packets =0 ; +unsigned int bytes =0 ;int completed;if (qeth_out_queue_is_empty (queue)) {
@@ -5211,13 +5219,19 @@ static int qeth_tx_poll(struct napi_struct *napi, int budget) }for (i = start; i < start + completed; i++) { +struct qeth_qdio_out_buffer *buffer;unsigned int bidx =QDIO_BUFNR (i); -qeth_handle_send_error (card, queue->bufs[bidx], error); + buffer = queue->bufs[bidx]; + packets +=skb_queue_len (&buffer->skb_list); + bytes += buffer->bytes; + +qeth_handle_send_error (card, buffer, error);qeth_iqd_tx_complete (queue, bidx, error, budget);qeth_cleanup_handled_pending (queue, bidx, false); } +netdev_tx_completed_queue (txq, packets, bytes);atomic_sub (completed, &queue->used_buffers); work_done += completed;
Signature · 1 line
2.17.1
PATCH 7/7 s390/qeth: add xmit_more support for IQD devices
In reply to Julian WiedmannIQD devices offer limited support for bulking: all frames in a TX buffer need to have the same target. qeth_iqd_may_bulk() implements this constraint, and allows us to defer the TX doorbell until
(a) the buffer is full (since each buffer needs its own doorbell), or
(b) the entire TX queue is full, or
(b) we reached the BQL limit.
--- drivers/s390/net/qeth_core.h | 24 ++++++ drivers/s390/net/qeth_core_main.c | 128 ++++++++++++++++++++---------- 2 files changed, 109 insertions(+), 43 deletions(-)
drivers/s390/net/qeth_core.h +24 -0
@@ -378,6 +378,28 @@ enum qeth_header_ids {#define QETH_HDR_EXT_CSUM_TRANSP_REQ 0x20#define QETH_HDR_EXT_UDP 0x40/*bit off for TCP*/ +static inline bool qeth_l2_same_vlan (struct qeth_hdr_layer2 *h1, +struct qeth_hdr_layer2 *h2) +{ +return !((h1->flags[2 ] ^ h2->flags[2 ]) &QETH_LAYER2_FLAG_VLAN ) && + h1->vlan_id == h2->vlan_id; +} + +static inline bool qeth_l3_iqd_same_vlan (struct qeth_hdr_layer3 *h1, +struct qeth_hdr_layer3 *h2) +{ +return !((h1->ext_flags ^ h2->ext_flags) &QETH_HDR_EXT_VLAN_FRAME ) && + h1->vlan_id == h2->vlan_id; +} + +static inline bool qeth_l3_same_next_hop (struct qeth_hdr_layer3 *h1, +struct qeth_hdr_layer3 *h2) +{ +return !((h1->flags ^ h2->flags) &QETH_HDR_IPV6 ) && +ipv6_addr_equal (&h1->next_hop.ipv6_addr, + &h2->next_hop.ipv6_addr); +} +enum qeth_qdio_info_states {QETH_QDIO_UNINITIALIZED ,QETH_QDIO_ALLOCATED ,
@@ -508,6 +530,8 @@ struct qeth_qdio_out_q {atomic_t set_pci_flags_count;struct napi_struct napi;struct timer_list timer; +struct qeth_hdr *prev_hdr; +u8 bulk_start; };#define qeth_for_each_output_queue (card, q, i) \
drivers/s390/net/qeth_core_main.c +85 -43
208 lines not on this page · raw message
Signature · 1 line
2.17.1
David Miller
maintainerFrom: Julian Wiedmann <[email protected]>
Date: Fri, 23 Aug 2019 11:48:46 +0200
Quoted 5 lines
please apply one more round of qeth patches. These implement support for a bunch of TX-related features - namely TX NAPI, BQL and
xmit_more.Note that this includes two qdio patches which lay the necessary groundwork, and have been acked by Vasily.
Series applied, thanks.