Skip to content

Commit 0da9581

Browse files
einar-bei-ibmdavem330
authored andcommitted
qeth: exploit asynchronous delivery of storage blocks
This patch exploits the QDIO support for asynchronous delivery of storage blocks for Hipersockets. The exploitation is not configured per default and may be enabled via the function qeth_configure_cq. Signed-off-by: Einar Lueck <[email protected]> Signed-off-by: Frank Blaschka <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent aae7ea8 commit 0da9581

File tree

2 files changed

+480
-43
lines changed

2 files changed

+480
-43
lines changed

drivers/s390/net/qeth_core.h

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ struct qeth_perf_stats {
110110

111111
unsigned int sc_dp_p;
112112
unsigned int sc_p_dp;
113+
/* qdio_cq_handler: number of times called, time spent in */
114+
__u64 cq_start_time;
115+
unsigned int cq_cnt;
116+
unsigned int cq_time;
113117
/* qdio_input_handler: number of times called, time spent in */
114118
__u64 inbound_start_time;
115119
unsigned int inbound_cnt;
@@ -376,6 +380,11 @@ enum qeth_qdio_buffer_states {
376380
* outbound: filled by driver; owned by hardware in order to be sent
377381
*/
378382
QETH_QDIO_BUF_PRIMED,
383+
/*
384+
* inbound: not applicable
385+
* outbound: handled via transfer pending / completion queue
386+
*/
387+
QETH_QDIO_BUF_HANDLED_DELAYED,
379388
};
380389

381390
enum qeth_qdio_info_states {
@@ -413,8 +422,11 @@ struct qeth_qdio_out_buffer {
413422
atomic_t state;
414423
int next_element_to_fill;
415424
struct sk_buff_head skb_list;
416-
struct list_head ctx_list;
417425
int is_header[16];
426+
427+
struct qaob *aob;
428+
struct qeth_qdio_out_q *q;
429+
struct qeth_qdio_out_buffer *next_pending;
418430
};
419431

420432
struct qeth_card;
@@ -427,7 +439,8 @@ enum qeth_out_q_states {
427439

428440
struct qeth_qdio_out_q {
429441
struct qdio_buffer qdio_bufs[QDIO_MAX_BUFFERS_PER_Q];
430-
struct qeth_qdio_out_buffer bufs[QDIO_MAX_BUFFERS_PER_Q];
442+
struct qeth_qdio_out_buffer *bufs[QDIO_MAX_BUFFERS_PER_Q];
443+
struct qdio_outbuf_state *bufstates; /* convenience pointer */
431444
int queue_no;
432445
struct qeth_card *card;
433446
atomic_t state;
@@ -448,14 +461,17 @@ struct qeth_qdio_out_q {
448461
struct qeth_qdio_info {
449462
atomic_t state;
450463
/* input */
464+
int no_in_queues;
451465
struct qeth_qdio_q *in_q;
466+
struct qeth_qdio_q *c_q;
452467
struct qeth_qdio_buffer_pool in_buf_pool;
453468
struct qeth_qdio_buffer_pool init_pool;
454469
int in_buf_size;
455470

456471
/* output */
457472
int no_out_queues;
458473
struct qeth_qdio_out_q **out_qs;
474+
struct qdio_outbuf_state *out_bufstates;
459475

460476
/* priority queueing */
461477
int do_prio_queueing;
@@ -527,6 +543,12 @@ enum qeth_cmd_buffer_state {
527543
BUF_STATE_PROCESSED,
528544
};
529545

546+
enum qeth_cq {
547+
QETH_CQ_DISABLED = 0,
548+
QETH_CQ_ENABLED = 1,
549+
QETH_CQ_NOTAVAILABLE = 2,
550+
};
551+
530552
struct qeth_ipato {
531553
int enabled;
532554
int invert4;
@@ -651,6 +673,7 @@ struct qeth_card_options {
651673
int rx_sg_cb;
652674
enum qeth_ipa_isolation_modes isolation;
653675
int sniffer;
676+
enum qeth_cq cq;
654677
};
655678

656679
/*
@@ -888,6 +911,7 @@ void qeth_dbf_longtext(debug_info_t *id, int level, char *text, ...);
888911
int qeth_core_ethtool_get_settings(struct net_device *, struct ethtool_cmd *);
889912
int qeth_set_access_ctrl_online(struct qeth_card *card);
890913
int qeth_hdr_chk_and_bounce(struct sk_buff *, int);
914+
int qeth_configure_cq(struct qeth_card *, enum qeth_cq);
891915
int qeth_hw_trap(struct qeth_card *, enum qeth_diags_trap_action);
892916
int qeth_query_ipassists(struct qeth_card *, enum qeth_prot_versions prot);
893917

0 commit comments

Comments
 (0)