mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
This commit is contained in:
commit
028940342a
232 changed files with 1488 additions and 1060 deletions
|
|
@ -1426,15 +1426,6 @@ static inline bool netdev_uses_dsa_tags(struct net_device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_NET_NS
|
||||
static inline void skb_set_dev(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
skb->dev = dev;
|
||||
}
|
||||
#else /* CONFIG_NET_NS */
|
||||
void skb_set_dev(struct sk_buff *skb, struct net_device *dev);
|
||||
#endif
|
||||
|
||||
static inline bool netdev_uses_trailer_tags(struct net_device *dev)
|
||||
{
|
||||
#ifdef CONFIG_NET_DSA_TAG_TRAILER
|
||||
|
|
|
|||
|
|
@ -99,6 +99,22 @@ struct ip_set_hash {
|
|||
#endif
|
||||
};
|
||||
|
||||
static size_t
|
||||
htable_size(u8 hbits)
|
||||
{
|
||||
size_t hsize;
|
||||
|
||||
/* We must fit both into u32 in jhash and size_t */
|
||||
if (hbits > 31)
|
||||
return 0;
|
||||
hsize = jhash_size(hbits);
|
||||
if ((((size_t)-1) - sizeof(struct htable))/sizeof(struct hbucket)
|
||||
< hsize)
|
||||
return 0;
|
||||
|
||||
return hsize * sizeof(struct hbucket) + sizeof(struct htable);
|
||||
}
|
||||
|
||||
/* Compute htable_bits from the user input parameter hashsize */
|
||||
static u8
|
||||
htable_bits(u32 hashsize)
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ static inline unsigned __read_seqcount_begin(const seqcount_t *s)
|
|||
unsigned ret;
|
||||
|
||||
repeat:
|
||||
ret = s->sequence;
|
||||
ret = ACCESS_ONCE(s->sequence);
|
||||
if (unlikely(ret & 1)) {
|
||||
cpu_relax();
|
||||
goto repeat;
|
||||
|
|
@ -165,6 +165,27 @@ static inline unsigned read_seqcount_begin(const seqcount_t *s)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* raw_seqcount_begin - begin a seq-read critical section
|
||||
* @s: pointer to seqcount_t
|
||||
* Returns: count to be passed to read_seqcount_retry
|
||||
*
|
||||
* raw_seqcount_begin opens a read critical section of the given seqcount.
|
||||
* Validity of the critical section is tested by checking read_seqcount_retry
|
||||
* function.
|
||||
*
|
||||
* Unlike read_seqcount_begin(), this function will not wait for the count
|
||||
* to stabilize. If a writer is active when we begin, we will fail the
|
||||
* read_seqcount_retry() instead of stabilizing at the beginning of the
|
||||
* critical section.
|
||||
*/
|
||||
static inline unsigned raw_seqcount_begin(const seqcount_t *s)
|
||||
{
|
||||
unsigned ret = ACCESS_ONCE(s->sequence);
|
||||
smp_rmb();
|
||||
return ret & ~1;
|
||||
}
|
||||
|
||||
/**
|
||||
* __read_seqcount_retry - end a seq-read critical section (without barrier)
|
||||
* @s: pointer to seqcount_t
|
||||
|
|
|
|||
|
|
@ -191,7 +191,8 @@ extern void usbnet_cdc_status(struct usbnet *, struct urb *);
|
|||
enum skb_state {
|
||||
illegal = 0,
|
||||
tx_start, tx_done,
|
||||
rx_start, rx_done, rx_cleanup
|
||||
rx_start, rx_done, rx_cleanup,
|
||||
unlink_start
|
||||
};
|
||||
|
||||
struct skb_data { /* skb->cb is one of these */
|
||||
|
|
|
|||
Loading…
Reference in a new issue