aboutsummaryrefslogtreecommitdiffstats
path: root/net/lapb/lapb_out.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-21 13:03:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-21 13:03:46 -0400
commitcb62ab71fe2b16e8203a0f0a2ef4eda23d761338 (patch)
tree536ba39658e47d511a489c52f7aac60cd78967e5 /net/lapb/lapb_out.c
parent31ed8e6f93a27304c9e157dab0267772cd94eaad (diff)
parent74863948f925d9f3bb4e3d3a783e49e9c662d839 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking changes from David Miller: 1) Get rid of the error prone NLA_PUT*() macros that used an embedded goto. 2) Kill off the token-ring and MCA networking drivers, from Paul Gortmaker. 3) Reduce high-order allocations made by datagram AF_UNIX sockets, from Eric Dumazet. 4) Add PTP hardware clock support to IGB and IXGBE, from Richard Cochran and Jacob Keller. 5) Allow users to query timestamping capabilities of a card via ethtool, from Richard Cochran. 6) Add loadbalance mode to the teaming driver, from Jiri Pirko. Part of this is that we can now have BPF filters not attached to sockets, and the loadbalancing function is calculated using one. 7) Francois Romieu went through the network drivers removing gratuitous uses of netdev->base_addr, perhaps some day we can remove it completely but it's used for ISA probing still. 8) Add a BPF JIT for sparc. I know, who cares, right? :-) 9) Move networking sysctl registry away from using the compatability mode interfaces in the sysctl code. From Eric W Biederman. 10) Pavel Emelyanov added a way to save and restore TCP socket state via TCP_REPAIR, TCP_REPAIR_QUEUE, and TCP_QUEUE_SEQ socket options as well as a way to forcefully bind a socket to a port via the sk->sk_reuse value SK_FORCE_REUSE. There is also a TCP_REPAIR_OPTIONS which allows to reinstante the TCP options enabled on the connection. 11) Several enhancements from Eric Dumazet that, in particular, can enhance splice performance on TCP sockets significantly. a) Reset the offset of the per-socket sendmsg page when we know we're the only use of the page in linear_to_page(). b) Add facilities such that skb->data can be backed a page rather than SLAB kmalloc'd memory. In particular devices which were receiving into linear RX buffers can now end up providing paged data. The big result is that code like splice and GRO do not have to copy any more. 12) Allow a pure sender to more gracefully handle ACK backlogs in TCP. What can happen at high rates is that the sender hasn't grown his receive buffer limits at all (he's not receiving data so really doesn't need to), but the non-data ACKs consume receive buffer space. sk_add_backlog() is too aggressive in dropping frames in this case, so relax it's requirements by using the receive buffer plus the send buffer limit as the backlog limit instead of just the former. Also from Eric Dumazet. 13) Add ipv6 support to L2TP, from Benjamin LaHaise, James Chapman, and Chris Elston. 14) Implement TCP early retransmit (RFC 5827), from Yuchung Cheng. Basically, we can start fast retransmit before hiting the dupack threshold under certain conditions. 15) New CODEL active queue management packet scheduler, from Eric Dumazet based upon initial work by Dave Taht. Basically, the big feature is that packets are dropped (or ECN bits are set) based upon how long packets live in the queue, rather than the queue length (which is what RED uses). * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1341 commits) drivers/net/stmmac: seq_file fix memory leak ipv6/exthdrs: strict Pad1 and PadN check USB: qmi_wwan: Add ZTE (Vodafone) K3520-Z USB: qmi_wwan: Add ZTE (Vodafone) K3765-Z USB: qmi_wwan: Make forced int 4 whitelist generic net/ipv4: replace simple_strtoul with kstrtoul net/ipv4/ipconfig: neaten __setup placement net: qmi_wwan: Add Vodafone/Huawei K5005 support net: cdc_ether: Add ZTE WWAN matches before generic Ethernet ipv6: use skb coalescing in reassembly ipv4: use skb coalescing in defragmentation net: introduce skb_try_coalesce() net:ipv6:fixed space issues relating to operators. net:ipv6:fixed a trailing white space issue. ipv6: disable GSO on sockets hitting dst_allfrag tg3: use netdev_alloc_frag() API net: napi_frags_skb() is static ppp: avoid false drop_monitor false positives ipv6: bool/const conversions phase2 ipx: Remove spurious NULL checking in ipx_ioctl(). ...
Diffstat (limited to 'net/lapb/lapb_out.c')
-rw-r--r--net/lapb/lapb_out.c38
1 files changed, 13 insertions, 25 deletions
diff --git a/net/lapb/lapb_out.c b/net/lapb/lapb_out.c
index baab2760f651..ba4d015bd1a6 100644
--- a/net/lapb/lapb_out.c
+++ b/net/lapb/lapb_out.c
@@ -14,6 +14,8 @@
14 * LAPB 002 Jonathan Naylor New timer architecture. 14 * LAPB 002 Jonathan Naylor New timer architecture.
15 */ 15 */
16 16
17#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
18
17#include <linux/errno.h> 19#include <linux/errno.h>
18#include <linux/types.h> 20#include <linux/types.h>
19#include <linux/socket.h> 21#include <linux/socket.h>
@@ -60,10 +62,8 @@ static void lapb_send_iframe(struct lapb_cb *lapb, struct sk_buff *skb, int poll
60 *frame |= lapb->vs << 1; 62 *frame |= lapb->vs << 1;
61 } 63 }
62 64
63#if LAPB_DEBUG > 1 65 lapb_dbg(1, "(%p) S%d TX I(%d) S%d R%d\n",
64 printk(KERN_DEBUG "lapb: (%p) S%d TX I(%d) S%d R%d\n", 66 lapb->dev, lapb->state, poll_bit, lapb->vs, lapb->vr);
65 lapb->dev, lapb->state, poll_bit, lapb->vs, lapb->vr);
66#endif
67 67
68 lapb_transmit_buffer(lapb, skb, LAPB_COMMAND); 68 lapb_transmit_buffer(lapb, skb, LAPB_COMMAND);
69} 69}
@@ -148,11 +148,9 @@ void lapb_transmit_buffer(struct lapb_cb *lapb, struct sk_buff *skb, int type)
148 } 148 }
149 } 149 }
150 150
151#if LAPB_DEBUG > 2 151 lapb_dbg(2, "(%p) S%d TX %02X %02X %02X\n",
152 printk(KERN_DEBUG "lapb: (%p) S%d TX %02X %02X %02X\n", 152 lapb->dev, lapb->state,
153 lapb->dev, lapb->state, 153 skb->data[0], skb->data[1], skb->data[2]);
154 skb->data[0], skb->data[1], skb->data[2]);
155#endif
156 154
157 if (!lapb_data_transmit(lapb, skb)) 155 if (!lapb_data_transmit(lapb, skb))
158 kfree_skb(skb); 156 kfree_skb(skb);
@@ -164,16 +162,10 @@ void lapb_establish_data_link(struct lapb_cb *lapb)
164 lapb->n2count = 0; 162 lapb->n2count = 0;
165 163
166 if (lapb->mode & LAPB_EXTENDED) { 164 if (lapb->mode & LAPB_EXTENDED) {
167#if LAPB_DEBUG > 1 165 lapb_dbg(1, "(%p) S%d TX SABME(1)\n", lapb->dev, lapb->state);
168 printk(KERN_DEBUG "lapb: (%p) S%d TX SABME(1)\n",
169 lapb->dev, lapb->state);
170#endif
171 lapb_send_control(lapb, LAPB_SABME, LAPB_POLLON, LAPB_COMMAND); 166 lapb_send_control(lapb, LAPB_SABME, LAPB_POLLON, LAPB_COMMAND);
172 } else { 167 } else {
173#if LAPB_DEBUG > 1 168 lapb_dbg(1, "(%p) S%d TX SABM(1)\n", lapb->dev, lapb->state);
174 printk(KERN_DEBUG "lapb: (%p) S%d TX SABM(1)\n",
175 lapb->dev, lapb->state);
176#endif
177 lapb_send_control(lapb, LAPB_SABM, LAPB_POLLON, LAPB_COMMAND); 169 lapb_send_control(lapb, LAPB_SABM, LAPB_POLLON, LAPB_COMMAND);
178 } 170 }
179 171
@@ -183,10 +175,8 @@ void lapb_establish_data_link(struct lapb_cb *lapb)
183 175
184void lapb_enquiry_response(struct lapb_cb *lapb) 176void lapb_enquiry_response(struct lapb_cb *lapb)
185{ 177{
186#if LAPB_DEBUG > 1 178 lapb_dbg(1, "(%p) S%d TX RR(1) R%d\n",
187 printk(KERN_DEBUG "lapb: (%p) S%d TX RR(1) R%d\n", 179 lapb->dev, lapb->state, lapb->vr);
188 lapb->dev, lapb->state, lapb->vr);
189#endif
190 180
191 lapb_send_control(lapb, LAPB_RR, LAPB_POLLON, LAPB_RESPONSE); 181 lapb_send_control(lapb, LAPB_RR, LAPB_POLLON, LAPB_RESPONSE);
192 182
@@ -195,10 +185,8 @@ void lapb_enquiry_response(struct lapb_cb *lapb)
195 185
196void lapb_timeout_response(struct lapb_cb *lapb) 186void lapb_timeout_response(struct lapb_cb *lapb)
197{ 187{
198#if LAPB_DEBUG > 1 188 lapb_dbg(1, "(%p) S%d TX RR(0) R%d\n",
199 printk(KERN_DEBUG "lapb: (%p) S%d TX RR(0) R%d\n", 189 lapb->dev, lapb->state, lapb->vr);
200 lapb->dev, lapb->state, lapb->vr);
201#endif
202 lapb_send_control(lapb, LAPB_RR, LAPB_POLLOFF, LAPB_RESPONSE); 190 lapb_send_control(lapb, LAPB_RR, LAPB_POLLOFF, LAPB_RESPONSE);
203 191
204 lapb->condition &= ~LAPB_ACK_PENDING_CONDITION; 192 lapb->condition &= ~LAPB_ACK_PENDING_CONDITION;