aboutsummaryrefslogtreecommitdiffstats
path: root/net/strparser/strparser.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-07-02 21:26:50 -0400
committerDavid S. Miller <davem@davemloft.net>2018-07-02 21:29:26 -0400
commit5cd3da4ba2397ef07226ca2aa5094ed21ff8198f (patch)
treecaa3c5968df02c296e9644a98c00e759d011b44c /net/strparser/strparser.c
parentf6779e4e53b6177c319f05b61a5c447137d0ab70 (diff)
parentd0fbad0aec1df29717fab736eb24c8a49cf2c70b (diff)
Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
Simple overlapping changes in stmmac driver. Adjust skb_gro_flush_final_remcsum function signature to make GRO list changes in net-next, as per Stephen Rothwell's example merge resolution. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/strparser/strparser.c')
-rw-r--r--net/strparser/strparser.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/net/strparser/strparser.c b/net/strparser/strparser.c
index 4f40a90ca016..3a512936eea9 100644
--- a/net/strparser/strparser.c
+++ b/net/strparser/strparser.c
@@ -35,7 +35,6 @@ struct _strp_msg {
35 */ 35 */
36 struct strp_msg strp; 36 struct strp_msg strp;
37 int accum_len; 37 int accum_len;
38 int early_eaten;
39}; 38};
40 39
41static inline struct _strp_msg *_strp_msg(struct sk_buff *skb) 40static inline struct _strp_msg *_strp_msg(struct sk_buff *skb)
@@ -115,20 +114,6 @@ static int __strp_recv(read_descriptor_t *desc, struct sk_buff *orig_skb,
115 head = strp->skb_head; 114 head = strp->skb_head;
116 if (head) { 115 if (head) {
117 /* Message already in progress */ 116 /* Message already in progress */
118
119 stm = _strp_msg(head);
120 if (unlikely(stm->early_eaten)) {
121 /* Already some number of bytes on the receive sock
122 * data saved in skb_head, just indicate they
123 * are consumed.
124 */
125 eaten = orig_len <= stm->early_eaten ?
126 orig_len : stm->early_eaten;
127 stm->early_eaten -= eaten;
128
129 return eaten;
130 }
131
132 if (unlikely(orig_offset)) { 117 if (unlikely(orig_offset)) {
133 /* Getting data with a non-zero offset when a message is 118 /* Getting data with a non-zero offset when a message is
134 * in progress is not expected. If it does happen, we 119 * in progress is not expected. If it does happen, we
@@ -301,9 +286,9 @@ static int __strp_recv(read_descriptor_t *desc, struct sk_buff *orig_skb,
301 } 286 }
302 287
303 stm->accum_len += cand_len; 288 stm->accum_len += cand_len;
289 eaten += cand_len;
304 strp->need_bytes = stm->strp.full_len - 290 strp->need_bytes = stm->strp.full_len -
305 stm->accum_len; 291 stm->accum_len;
306 stm->early_eaten = cand_len;
307 STRP_STATS_ADD(strp->stats.bytes, cand_len); 292 STRP_STATS_ADD(strp->stats.bytes, cand_len);
308 desc->count = 0; /* Stop reading socket */ 293 desc->count = 0; /* Stop reading socket */
309 break; 294 break;