Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351485
b: refs/heads/master
c: 610a63f
h: refs/heads/master
i:
  351483: 89c9388
v: v3
  • Loading branch information
John Fastabend authored and Jeff Kirsher committed Jan 19, 2013
1 parent 3b0e901 commit 1c72a12
Show file tree
Hide file tree
Showing 46 changed files with 315 additions and 652 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 41d06b13dbe1af3e1aa5bae1988bfc92ff71be6b
refs/heads/master: 610a63fc8ef903a11921bb48f26fd4d34aacd3c0
40 changes: 39 additions & 1 deletion trunk/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <linux/dcbnl.h>
#include "ixgbe_dcb_82598.h"
#include "ixgbe_dcb_82599.h"
#include "ixgbe_sriov.h"

/* Callbacks for DCB netlink in the kernel */
#define BIT_DCB_MODE 0x01
Expand Down Expand Up @@ -643,9 +644,11 @@ static int ixgbe_dcbnl_ieee_setapp(struct net_device *dev,
return err;

err = dcb_ieee_setapp(dev, app);
if (err)
return err;

#ifdef IXGBE_FCOE
if (!err && app->selector == IEEE_8021QAZ_APP_SEL_ETHERTYPE &&
if (app->selector == IEEE_8021QAZ_APP_SEL_ETHERTYPE &&
app->protocol == ETH_P_FCOE) {
u8 app_mask = dcb_ieee_getapp_mask(dev, app);

Expand All @@ -656,6 +659,23 @@ static int ixgbe_dcbnl_ieee_setapp(struct net_device *dev,
ixgbe_dcbnl_devreset(dev);
}
#endif

/* VF devices should use default UP when available */
if (app->selector == IEEE_8021QAZ_APP_SEL_ETHERTYPE &&
app->protocol == 0) {
int vf;

adapter->default_up = app->priority;

for (vf = 0; vf < adapter->num_vfs; vf++) {
struct vf_data_storage *vfinfo = &adapter->vfinfo[vf];

if (!vfinfo->pf_qos)
ixgbe_set_vmvir(adapter, vfinfo->pf_vlan,
app->priority, vf);
}
}

return 0;
}

Expand Down Expand Up @@ -683,6 +703,24 @@ static int ixgbe_dcbnl_ieee_delapp(struct net_device *dev,
ixgbe_dcbnl_devreset(dev);
}
#endif
/* IF default priority is being removed clear VF default UP */
if (app->selector == IEEE_8021QAZ_APP_SEL_ETHERTYPE &&
app->protocol == 0 && adapter->default_up == app->priority) {
int vf;
long unsigned int app_mask = dcb_ieee_getapp_mask(dev, app);
int qos = app_mask ? find_first_bit(&app_mask, 8) : 0;

adapter->default_up = qos;

for (vf = 0; vf < adapter->num_vfs; vf++) {
struct vf_data_storage *vfinfo = &adapter->vfinfo[vf];

if (!vfinfo->pf_qos)
ixgbe_set_vmvir(adapter, vfinfo->pf_vlan,
qos, vf);
}
}

return err;
}

Expand Down
9 changes: 0 additions & 9 deletions trunk/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,15 +447,6 @@ static void ixgbe_set_vmolr(struct ixgbe_hw *hw, u32 vf, bool aupe)
IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf), vmolr);
}

static void ixgbe_set_vmvir(struct ixgbe_adapter *adapter,
u16 vid, u16 qos, u32 vf)
{
struct ixgbe_hw *hw = &adapter->hw;
u32 vmvir = vid | (qos << VLAN_PRIO_SHIFT) | IXGBE_VMVIR_VLANA_DEFAULT;

IXGBE_WRITE_REG(hw, IXGBE_VMVIR(vf), vmvir);
}

static void ixgbe_clear_vmvir(struct ixgbe_adapter *adapter, u32 vf)
{
struct ixgbe_hw *hw = &adapter->hw;
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ void ixgbe_enable_sriov(struct ixgbe_adapter *adapter,
const struct ixgbe_info *ii);
#endif

static inline void ixgbe_set_vmvir(struct ixgbe_adapter *adapter,
u16 vid, u16 qos, u32 vf)
{
struct ixgbe_hw *hw = &adapter->hw;
u32 vmvir = vid | (qos << VLAN_PRIO_SHIFT) | IXGBE_VMVIR_VLANA_DEFAULT;

IXGBE_WRITE_REG(hw, IXGBE_VMVIR(vf), vmvir);
}

#endif /* _IXGBE_SRIOV_H_ */

2 changes: 1 addition & 1 deletion trunk/net/batman-adv/bat_algo.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2011-2013 B.A.T.M.A.N. contributors:
/* Copyright (C) 2011-2012 B.A.T.M.A.N. contributors:
*
* Marek Lindner
*
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/batman-adv/bat_iv_ogm.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2007-2013 B.A.T.M.A.N. contributors:
/* Copyright (C) 2007-2012 B.A.T.M.A.N. contributors:
*
* Marek Lindner, Simon Wunderlich
*
Expand Down Expand Up @@ -123,15 +123,15 @@ batadv_iv_ogm_emit_send_time(const struct batadv_priv *bat_priv)
unsigned int msecs;

msecs = atomic_read(&bat_priv->orig_interval) - BATADV_JITTER;
msecs += prandom_u32() % (2 * BATADV_JITTER);
msecs += random32() % (2 * BATADV_JITTER);

return jiffies + msecs_to_jiffies(msecs);
}

/* when do we schedule a ogm packet to be sent */
static unsigned long batadv_iv_ogm_fwd_send_time(void)
{
return jiffies + msecs_to_jiffies(prandom_u32() % (BATADV_JITTER / 2));
return jiffies + msecs_to_jiffies(random32() % (BATADV_JITTER / 2));
}

/* apply hop penalty for a normal link */
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/batman-adv/bitarray.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2006-2013 B.A.T.M.A.N. contributors:
/* Copyright (C) 2006-2012 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich, Marek Lindner
*
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/batman-adv/bitarray.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2006-2013 B.A.T.M.A.N. contributors:
/* Copyright (C) 2006-2012 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich, Marek Lindner
*
Expand Down
Loading

0 comments on commit 1c72a12

Please sign in to comment.