···6262================63636464 AF_RDS, PF_RDS, SOL_RDS6565- These constants haven't been assigned yet, because RDS isn't in6666- mainline yet. Currently, the kernel module assigns some constant6767- and publishes it to user space through two sysctl files6868- /proc/sys/net/rds/pf_rds6969- /proc/sys/net/rds/sol_rds6565+ AF_RDS and PF_RDS are the domain type to be used with socket(2)6666+ to create RDS sockets. SOL_RDS is the socket-level to be used6767+ with setsockopt(2) and getsockopt(2) for RDS specific socket6868+ options.70697170 fd = socket(PF_RDS, SOCK_SEQPACKET, 0);7271 This creates a new, unbound RDS socket.
+1
drivers/net/ethernet/emulex/benet/be.h
···9999#define BE_NAPI_WEIGHT 64100100#define MAX_RX_POST BE_NAPI_WEIGHT /* Frags posted at a time */101101#define RX_FRAGS_REFILL_WM (RX_Q_LEN - MAX_RX_POST)102102+#define MAX_NUM_POST_ERX_DB 255u102103103104#define MAX_VFS 30 /* Max VFs supported by BE3 FW */104105#define FW_VER_LEN 32
+1-1
drivers/net/ethernet/emulex/benet/be_main.c
···21222122 if (rxo->rx_post_starved)21232123 rxo->rx_post_starved = false;21242124 do {21252125- notify = min(256u, posted);21252125+ notify = min(MAX_NUM_POST_ERX_DB, posted);21262126 be_rxq_notify(adapter, rxq->id, notify);21272127 posted -= notify;21282128 } while (posted);
+2-2
drivers/net/phy/Kconfig
···6868config BROADCOM_PHY6969 tristate "Drivers for Broadcom PHYs"7070 ---help---7171- Currently supports the BCM5411, BCM5421, BCM5461, BCM5464, BCM54817272- and BCM5482 PHYs.7171+ Currently supports the BCM5411, BCM5421, BCM5461, BCM54616S, BCM5464,7272+ BCM5481 and BCM5482 PHYs.73737474config BCM63XX_PHY7575 tristate "Drivers for Broadcom 63xx SOCs internal PHY"
···130130 rcu_read_lock();131131 conn = rds_conn_lookup(head, laddr, faddr, trans);132132 if (conn && conn->c_loopback && conn->c_trans != &rds_loop_transport &&133133- !is_outgoing) {133133+ laddr == faddr && !is_outgoing) {134134 /* This is a looped back IB connection, and we're135135 * called by the code handling the incoming connect.136136 * We need a second connection object into which we···193193 }194194195195 atomic_set(&conn->c_state, RDS_CONN_DOWN);196196+ conn->c_send_gen = 0;196197 conn->c_reconnect_jiffies = 0;197198 INIT_DELAYED_WORK(&conn->c_send_w, rds_send_worker);198199 INIT_DELAYED_WORK(&conn->c_recv_w, rds_recv_worker);
+1
net/rds/rds.h
···110110 void *c_transport_data;111111112112 atomic_t c_state;113113+ unsigned long c_send_gen;113114 unsigned long c_flags;114115 unsigned long c_reconnect_jiffies;115116 struct delayed_work c_send_w;
+31-2
net/rds/send.c
···140140 struct scatterlist *sg;141141 int ret = 0;142142 LIST_HEAD(to_be_dropped);143143+ int batch_count;144144+ unsigned long send_gen = 0;143145144146restart:147147+ batch_count = 0;145148146149 /*147150 * sendmsg calls here after having queued its message on the send···158155 ret = -ENOMEM;159156 goto out;160157 }158158+159159+ /*160160+ * we record the send generation after doing the xmit acquire.161161+ * if someone else manages to jump in and do some work, we'll use162162+ * this to avoid a goto restart farther down.163163+ *164164+ * The acquire_in_xmit() check above ensures that only one165165+ * caller can increment c_send_gen at any time.166166+ */167167+ conn->c_send_gen++;168168+ send_gen = conn->c_send_gen;161169162170 /*163171 * rds_conn_shutdown() sets the conn state and then tests RDS_IN_XMIT,···215201 */216202 if (!rm) {217203 unsigned int len;204204+205205+ batch_count++;206206+207207+ /* we want to process as big a batch as we can, but208208+ * we also want to avoid softlockups. If we've been209209+ * through a lot of messages, lets back off and see210210+ * if anyone else jumps in211211+ */212212+ if (batch_count >= 1024)213213+ goto over_batch;218214219215 spin_lock_irqsave(&conn->c_lock, flags);220216···381357 }382358 }383359360360+over_batch:384361 if (conn->c_trans->xmit_complete)385362 conn->c_trans->xmit_complete(conn);386386-387363 release_in_xmit(conn);388364389365 /* Nuke any messages we decided not to retransmit. */···404380 * If the transport cannot continue (i.e ret != 0), then it must405381 * call us when more room is available, such as from the tx406382 * completion handler.383383+ *384384+ * We have an extra generation check here so that if someone manages385385+ * to jump in after our release_in_xmit, we'll see that they have done386386+ * some work and we will skip our goto407387 */408388 if (ret == 0) {409389 smp_mb();410410- if (!list_empty(&conn->c_send_queue)) {390390+ if (!list_empty(&conn->c_send_queue) &&391391+ send_gen == conn->c_send_gen) {411392 rds_stats_inc(s_send_lock_queue_raced);412393 goto restart;413394 }