mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 01:21:58 +00:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
One conflict in the BPF samples Makefile, some fixes in 'net' whilst we were converting over to Makefile.target rules in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
14684b9301
260 changed files with 2206 additions and 943 deletions
|
@ -140,6 +140,11 @@ static inline void sk_msg_apply_bytes(struct sk_psock *psock, u32 bytes)
|
|||
}
|
||||
}
|
||||
|
||||
static inline u32 sk_msg_iter_dist(u32 start, u32 end)
|
||||
{
|
||||
return end >= start ? end - start : end + (MAX_MSG_FRAGS - start);
|
||||
}
|
||||
|
||||
#define sk_msg_iter_var_prev(var) \
|
||||
do { \
|
||||
if (var == 0) \
|
||||
|
@ -199,9 +204,7 @@ static inline u32 sk_msg_elem_used(const struct sk_msg *msg)
|
|||
if (sk_msg_full(msg))
|
||||
return MAX_MSG_FRAGS;
|
||||
|
||||
return msg->sg.end >= msg->sg.start ?
|
||||
msg->sg.end - msg->sg.start :
|
||||
msg->sg.end + (MAX_MSG_FRAGS - msg->sg.start);
|
||||
return sk_msg_iter_dist(msg->sg.start, msg->sg.end);
|
||||
}
|
||||
|
||||
static inline struct scatterlist *sk_msg_elem(struct sk_msg *msg, int which)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue