You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-3.6
Conflicts: drivers/net/benet/be_main.c
This commit is contained in:
+7
-1
@@ -2536,7 +2536,7 @@ config S6GMAC
|
||||
source "drivers/net/stmmac/Kconfig"
|
||||
|
||||
config PCH_GBE
|
||||
tristate "PCH Gigabit Ethernet"
|
||||
tristate "Intel EG20T PCH / OKI SEMICONDUCTOR ML7223 IOH GbE"
|
||||
depends on PCI
|
||||
select MII
|
||||
---help---
|
||||
@@ -2548,6 +2548,12 @@ config PCH_GBE
|
||||
to Gigabit Ethernet.
|
||||
This driver enables Gigabit Ethernet function.
|
||||
|
||||
This driver also can be used for OKI SEMICONDUCTOR IOH(Input/
|
||||
Output Hub), ML7223.
|
||||
ML7223 IOH is for MP(Media Phone) use.
|
||||
ML7223 is companion chip for Intel Atom E6xx series.
|
||||
ML7223 is completely compatible for Intel EG20T PCH.
|
||||
|
||||
endif # NETDEV_1000
|
||||
|
||||
#
|
||||
|
||||
@@ -212,7 +212,7 @@ struct be_rx_stats {
|
||||
|
||||
struct be_rx_compl_info {
|
||||
u32 rss_hash;
|
||||
u16 vid;
|
||||
u16 vlan_tag;
|
||||
u16 pkt_size;
|
||||
u16 rxq_idx;
|
||||
u16 mac_id;
|
||||
|
||||
@@ -133,7 +133,7 @@ static void be_async_grp5_pvid_state_process(struct be_adapter *adapter,
|
||||
struct be_async_event_grp5_pvid_state *evt)
|
||||
{
|
||||
if (evt->enabled)
|
||||
adapter->pvid = evt->tag;
|
||||
adapter->pvid = le16_to_cpu(evt->tag);
|
||||
else
|
||||
adapter->pvid = 0;
|
||||
}
|
||||
|
||||
+14
-11
@@ -1017,7 +1017,8 @@ static void be_rx_compl_process(struct be_adapter *adapter,
|
||||
kfree_skb(skb);
|
||||
return;
|
||||
}
|
||||
vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, rxcp->vid);
|
||||
vlan_hwaccel_receive_skb(skb, adapter->vlan_grp,
|
||||
rxcp->vlan_tag);
|
||||
} else {
|
||||
netif_receive_skb(skb);
|
||||
}
|
||||
@@ -1077,7 +1078,8 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter,
|
||||
if (likely(!rxcp->vlanf))
|
||||
napi_gro_frags(&eq_obj->napi);
|
||||
else
|
||||
vlan_gro_frags(&eq_obj->napi, adapter->vlan_grp, rxcp->vid);
|
||||
vlan_gro_frags(&eq_obj->napi, adapter->vlan_grp,
|
||||
rxcp->vlan_tag);
|
||||
}
|
||||
|
||||
static void be_parse_rx_compl_v1(struct be_adapter *adapter,
|
||||
@@ -1106,9 +1108,9 @@ static void be_parse_rx_compl_v1(struct be_adapter *adapter,
|
||||
AMAP_GET_BITS(struct amap_eth_rx_compl_v1, rsshash, rxcp);
|
||||
if (rxcp->vlanf) {
|
||||
rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vtm,
|
||||
compl);
|
||||
rxcp->vid = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vlan_tag,
|
||||
compl);
|
||||
compl);
|
||||
rxcp->vlan_tag = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vlan_tag,
|
||||
compl);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1138,9 +1140,9 @@ static void be_parse_rx_compl_v0(struct be_adapter *adapter,
|
||||
AMAP_GET_BITS(struct amap_eth_rx_compl_v0, rsshash, rxcp);
|
||||
if (rxcp->vlanf) {
|
||||
rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vtm,
|
||||
compl);
|
||||
rxcp->vid = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vlan_tag,
|
||||
compl);
|
||||
compl);
|
||||
rxcp->vlan_tag = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vlan_tag,
|
||||
compl);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1170,10 +1172,11 @@ static struct be_rx_compl_info *be_rx_compl_get(struct be_rx_obj *rxo)
|
||||
rxcp->vlanf = 0;
|
||||
|
||||
if (!lancer_chip(adapter))
|
||||
rxcp->vid = swab16(rxcp->vid);
|
||||
rxcp->vlan_tag = swab16(rxcp->vlan_tag);
|
||||
|
||||
if ((adapter->pvid == rxcp->vid) &&
|
||||
!adapter->vlan_tag[rxcp->vid])
|
||||
if (((adapter->pvid & VLAN_VID_MASK) ==
|
||||
(rxcp->vlan_tag & VLAN_VID_MASK)) &&
|
||||
!adapter->vlan_tag[rxcp->vlan_tag])
|
||||
rxcp->vlanf = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -583,7 +583,9 @@ static int slcan_open(struct tty_struct *tty)
|
||||
/* Done. We have linked the TTY line to a channel. */
|
||||
rtnl_unlock();
|
||||
tty->receive_room = 65536; /* We don't flow control */
|
||||
return sl->dev->base_addr;
|
||||
|
||||
/* TTY layer expects 0 on success */
|
||||
return 0;
|
||||
|
||||
err_free_chan:
|
||||
sl->tty = NULL;
|
||||
|
||||
@@ -68,15 +68,20 @@ static int ehea_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
|
||||
}
|
||||
ethtool_cmd_speed_set(cmd, speed);
|
||||
|
||||
cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_1000baseT_Full
|
||||
| SUPPORTED_100baseT_Full | SUPPORTED_100baseT_Half
|
||||
| SUPPORTED_10baseT_Full | SUPPORTED_10baseT_Half
|
||||
| SUPPORTED_Autoneg | SUPPORTED_FIBRE);
|
||||
if (cmd->speed == SPEED_10000) {
|
||||
cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE);
|
||||
cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_FIBRE);
|
||||
cmd->port = PORT_FIBRE;
|
||||
} else {
|
||||
cmd->supported = (SUPPORTED_1000baseT_Full | SUPPORTED_100baseT_Full
|
||||
| SUPPORTED_100baseT_Half | SUPPORTED_10baseT_Full
|
||||
| SUPPORTED_10baseT_Half | SUPPORTED_Autoneg
|
||||
| SUPPORTED_TP);
|
||||
cmd->advertising = (ADVERTISED_1000baseT_Full | ADVERTISED_Autoneg
|
||||
| ADVERTISED_TP);
|
||||
cmd->port = PORT_TP;
|
||||
}
|
||||
|
||||
cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_Autoneg
|
||||
| ADVERTISED_FIBRE);
|
||||
|
||||
cmd->port = PORT_FIBRE;
|
||||
cmd->autoneg = port->autoneg == 1 ? AUTONEG_ENABLE : AUTONEG_DISABLE;
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -34,6 +34,10 @@ const char pch_driver_version[] = DRV_VERSION;
|
||||
#define PCH_GBE_COPYBREAK_DEFAULT 256
|
||||
#define PCH_GBE_PCI_BAR 1
|
||||
|
||||
/* Macros for ML7223 */
|
||||
#define PCI_VENDOR_ID_ROHM 0x10db
|
||||
#define PCI_DEVICE_ID_ROHM_ML7223_GBE 0x8013
|
||||
|
||||
#define PCH_GBE_TX_WEIGHT 64
|
||||
#define PCH_GBE_RX_WEIGHT 64
|
||||
#define PCH_GBE_RX_BUFFER_WRITE 16
|
||||
@@ -43,8 +47,7 @@ const char pch_driver_version[] = DRV_VERSION;
|
||||
|
||||
#define PCH_GBE_MAC_RGMII_CTRL_SETTING ( \
|
||||
PCH_GBE_CHIP_TYPE_INTERNAL | \
|
||||
PCH_GBE_RGMII_MODE_RGMII | \
|
||||
PCH_GBE_CRS_SEL \
|
||||
PCH_GBE_RGMII_MODE_RGMII \
|
||||
)
|
||||
|
||||
/* Ethertype field values */
|
||||
@@ -1495,12 +1498,11 @@ pch_gbe_clean_rx(struct pch_gbe_adapter *adapter,
|
||||
/* Write meta date of skb */
|
||||
skb_put(skb, length);
|
||||
skb->protocol = eth_type_trans(skb, netdev);
|
||||
if ((tcp_ip_status & PCH_GBE_RXD_ACC_STAT_TCPIPOK) ==
|
||||
PCH_GBE_RXD_ACC_STAT_TCPIPOK) {
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
} else {
|
||||
if (tcp_ip_status & PCH_GBE_RXD_ACC_STAT_TCPIPOK)
|
||||
skb->ip_summed = CHECKSUM_NONE;
|
||||
}
|
||||
else
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
|
||||
napi_gro_receive(&adapter->napi, skb);
|
||||
(*work_done)++;
|
||||
pr_debug("Receive skb->ip_summed: %d length: %d\n",
|
||||
@@ -2442,6 +2444,13 @@ static DEFINE_PCI_DEVICE_TABLE(pch_gbe_pcidev_id) = {
|
||||
.class = (PCI_CLASS_NETWORK_ETHERNET << 8),
|
||||
.class_mask = (0xFFFF00)
|
||||
},
|
||||
{.vendor = PCI_VENDOR_ID_ROHM,
|
||||
.device = PCI_DEVICE_ID_ROHM_ML7223_GBE,
|
||||
.subvendor = PCI_ANY_ID,
|
||||
.subdevice = PCI_ANY_ID,
|
||||
.class = (PCI_CLASS_NETWORK_ETHERNET << 8),
|
||||
.class_mask = (0xFFFF00)
|
||||
},
|
||||
/* required last entry */
|
||||
{0}
|
||||
};
|
||||
|
||||
+3
-1
@@ -853,7 +853,9 @@ static int slip_open(struct tty_struct *tty)
|
||||
/* Done. We have linked the TTY line to a channel. */
|
||||
rtnl_unlock();
|
||||
tty->receive_room = 65536; /* We don't flow control */
|
||||
return sl->dev->base_addr;
|
||||
|
||||
/* TTY layer expects 0 on success */
|
||||
return 0;
|
||||
|
||||
err_free_bufs:
|
||||
sl_free_bufs(sl);
|
||||
|
||||
@@ -567,7 +567,7 @@ static const struct usb_device_id products [] = {
|
||||
{
|
||||
USB_DEVICE_AND_INTERFACE_INFO(0x1004, 0x61aa, USB_CLASS_COMM,
|
||||
USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
|
||||
.driver_info = 0,
|
||||
.driver_info = (unsigned long)&wwan_info,
|
||||
},
|
||||
|
||||
/*
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
#define IPHETH_USBINTF_PROTO 1
|
||||
|
||||
#define IPHETH_BUF_SIZE 1516
|
||||
#define IPHETH_IP_ALIGN 2 /* padding at front of URB */
|
||||
#define IPHETH_TX_TIMEOUT (5 * HZ)
|
||||
|
||||
#define IPHETH_INTFNUM 2
|
||||
@@ -202,18 +203,21 @@ static void ipheth_rcvbulk_callback(struct urb *urb)
|
||||
return;
|
||||
}
|
||||
|
||||
len = urb->actual_length;
|
||||
buf = urb->transfer_buffer;
|
||||
if (urb->actual_length <= IPHETH_IP_ALIGN) {
|
||||
dev->net->stats.rx_length_errors++;
|
||||
return;
|
||||
}
|
||||
len = urb->actual_length - IPHETH_IP_ALIGN;
|
||||
buf = urb->transfer_buffer + IPHETH_IP_ALIGN;
|
||||
|
||||
skb = dev_alloc_skb(NET_IP_ALIGN + len);
|
||||
skb = dev_alloc_skb(len);
|
||||
if (!skb) {
|
||||
err("%s: dev_alloc_skb: -ENOMEM", __func__);
|
||||
dev->net->stats.rx_dropped++;
|
||||
return;
|
||||
}
|
||||
|
||||
skb_reserve(skb, NET_IP_ALIGN);
|
||||
memcpy(skb_put(skb, len), buf + NET_IP_ALIGN, len - NET_IP_ALIGN);
|
||||
memcpy(skb_put(skb, len), buf, len);
|
||||
skb->dev = dev->net;
|
||||
skb->protocol = eth_type_trans(skb, dev->net);
|
||||
|
||||
|
||||
@@ -178,6 +178,7 @@ static void
|
||||
vmxnet3_process_events(struct vmxnet3_adapter *adapter)
|
||||
{
|
||||
int i;
|
||||
unsigned long flags;
|
||||
u32 events = le32_to_cpu(adapter->shared->ecr);
|
||||
if (!events)
|
||||
return;
|
||||
@@ -190,10 +191,10 @@ vmxnet3_process_events(struct vmxnet3_adapter *adapter)
|
||||
|
||||
/* Check if there is an error on xmit/recv queues */
|
||||
if (events & (VMXNET3_ECR_TQERR | VMXNET3_ECR_RQERR)) {
|
||||
spin_lock(&adapter->cmd_lock);
|
||||
spin_lock_irqsave(&adapter->cmd_lock, flags);
|
||||
VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
|
||||
VMXNET3_CMD_GET_QUEUE_STATUS);
|
||||
spin_unlock(&adapter->cmd_lock);
|
||||
spin_unlock_irqrestore(&adapter->cmd_lock, flags);
|
||||
|
||||
for (i = 0; i < adapter->num_tx_queues; i++)
|
||||
if (adapter->tqd_start[i].status.stopped)
|
||||
@@ -2720,13 +2721,14 @@ static void
|
||||
vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter)
|
||||
{
|
||||
u32 cfg;
|
||||
unsigned long flags;
|
||||
|
||||
/* intr settings */
|
||||
spin_lock(&adapter->cmd_lock);
|
||||
spin_lock_irqsave(&adapter->cmd_lock, flags);
|
||||
VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
|
||||
VMXNET3_CMD_GET_CONF_INTR);
|
||||
cfg = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD);
|
||||
spin_unlock(&adapter->cmd_lock);
|
||||
spin_unlock_irqrestore(&adapter->cmd_lock, flags);
|
||||
adapter->intr.type = cfg & 0x3;
|
||||
adapter->intr.mask_mode = (cfg >> 2) & 0x3;
|
||||
|
||||
|
||||
@@ -788,6 +788,7 @@ struct ip_vs_app {
|
||||
/* IPVS in network namespace */
|
||||
struct netns_ipvs {
|
||||
int gen; /* Generation */
|
||||
int enable; /* enable like nf_hooks do */
|
||||
/*
|
||||
* Hash table: for real service lookups
|
||||
*/
|
||||
@@ -1086,6 +1087,22 @@ ip_vs_control_add(struct ip_vs_conn *cp, struct ip_vs_conn *ctl_cp)
|
||||
atomic_inc(&ctl_cp->n_control);
|
||||
}
|
||||
|
||||
/*
|
||||
* IPVS netns init & cleanup functions
|
||||
*/
|
||||
extern int __ip_vs_estimator_init(struct net *net);
|
||||
extern int __ip_vs_control_init(struct net *net);
|
||||
extern int __ip_vs_protocol_init(struct net *net);
|
||||
extern int __ip_vs_app_init(struct net *net);
|
||||
extern int __ip_vs_conn_init(struct net *net);
|
||||
extern int __ip_vs_sync_init(struct net *net);
|
||||
extern void __ip_vs_conn_cleanup(struct net *net);
|
||||
extern void __ip_vs_app_cleanup(struct net *net);
|
||||
extern void __ip_vs_protocol_cleanup(struct net *net);
|
||||
extern void __ip_vs_control_cleanup(struct net *net);
|
||||
extern void __ip_vs_estimator_cleanup(struct net *net);
|
||||
extern void __ip_vs_sync_cleanup(struct net *net);
|
||||
extern void __ip_vs_service_cleanup(struct net *net);
|
||||
|
||||
/*
|
||||
* IPVS application functions
|
||||
|
||||
@@ -324,6 +324,7 @@ struct xfrm_state_afinfo {
|
||||
int (*tmpl_sort)(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n);
|
||||
int (*state_sort)(struct xfrm_state **dst, struct xfrm_state **src, int n);
|
||||
int (*output)(struct sk_buff *skb);
|
||||
int (*output_finish)(struct sk_buff *skb);
|
||||
int (*extract_input)(struct xfrm_state *x,
|
||||
struct sk_buff *skb);
|
||||
int (*extract_output)(struct xfrm_state *x,
|
||||
@@ -1463,6 +1464,7 @@ static inline int xfrm4_rcv_spi(struct sk_buff *skb, int nexthdr, __be32 spi)
|
||||
extern int xfrm4_extract_output(struct xfrm_state *x, struct sk_buff *skb);
|
||||
extern int xfrm4_prepare_output(struct xfrm_state *x, struct sk_buff *skb);
|
||||
extern int xfrm4_output(struct sk_buff *skb);
|
||||
extern int xfrm4_output_finish(struct sk_buff *skb);
|
||||
extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler, unsigned short family);
|
||||
extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler, unsigned short family);
|
||||
extern int xfrm6_extract_header(struct sk_buff *skb);
|
||||
@@ -1479,6 +1481,7 @@ extern __be32 xfrm6_tunnel_spi_lookup(struct net *net, const xfrm_address_t *sad
|
||||
extern int xfrm6_extract_output(struct xfrm_state *x, struct sk_buff *skb);
|
||||
extern int xfrm6_prepare_output(struct xfrm_state *x, struct sk_buff *skb);
|
||||
extern int xfrm6_output(struct sk_buff *skb);
|
||||
extern int xfrm6_output_finish(struct sk_buff *skb);
|
||||
extern int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb,
|
||||
u8 **prevhdr);
|
||||
|
||||
|
||||
@@ -119,6 +119,9 @@ void unregister_vlan_dev(struct net_device *dev, struct list_head *head)
|
||||
|
||||
grp->nr_vlans--;
|
||||
|
||||
if (vlan->flags & VLAN_FLAG_GVRP)
|
||||
vlan_gvrp_request_leave(dev);
|
||||
|
||||
vlan_group_set_device(grp, vlan_id, NULL);
|
||||
/* Because unregister_netdevice_queue() makes sure at least one rcu
|
||||
* grace period is respected before device freeing,
|
||||
|
||||
@@ -314,9 +314,6 @@ static int vlan_dev_stop(struct net_device *dev)
|
||||
struct vlan_dev_info *vlan = vlan_dev_info(dev);
|
||||
struct net_device *real_dev = vlan->real_dev;
|
||||
|
||||
if (vlan->flags & VLAN_FLAG_GVRP)
|
||||
vlan_gvrp_request_leave(dev);
|
||||
|
||||
dev_mc_unsync(real_dev, dev);
|
||||
dev_uc_unsync(real_dev, dev);
|
||||
if (dev->flags & IFF_ALLMULTI)
|
||||
|
||||
@@ -1766,7 +1766,7 @@ static int compat_table_info(const struct ebt_table_info *info,
|
||||
|
||||
newinfo->entries_size = size;
|
||||
|
||||
xt_compat_init_offsets(AF_INET, info->nentries);
|
||||
xt_compat_init_offsets(NFPROTO_BRIDGE, info->nentries);
|
||||
return EBT_ENTRY_ITERATE(entries, size, compat_calc_entry, info,
|
||||
entries, newinfo);
|
||||
}
|
||||
@@ -1882,7 +1882,7 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt,
|
||||
struct xt_match *match;
|
||||
struct xt_target *wt;
|
||||
void *dst = NULL;
|
||||
int off, pad = 0, ret = 0;
|
||||
int off, pad = 0;
|
||||
unsigned int size_kern, entry_offset, match_size = mwt->match_size;
|
||||
|
||||
strlcpy(name, mwt->u.name, sizeof(name));
|
||||
@@ -1935,13 +1935,6 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt,
|
||||
break;
|
||||
}
|
||||
|
||||
if (!dst) {
|
||||
ret = xt_compat_add_offset(NFPROTO_BRIDGE, entry_offset,
|
||||
off + ebt_compat_entry_padsize());
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
state->buf_kern_offset += match_size + off;
|
||||
state->buf_user_offset += match_size;
|
||||
pad = XT_ALIGN(size_kern) - size_kern;
|
||||
@@ -2016,50 +2009,6 @@ static int ebt_size_mwt(struct compat_ebt_entry_mwt *match32,
|
||||
return growth;
|
||||
}
|
||||
|
||||
#define EBT_COMPAT_WATCHER_ITERATE(e, fn, args...) \
|
||||
({ \
|
||||
unsigned int __i; \
|
||||
int __ret = 0; \
|
||||
struct compat_ebt_entry_mwt *__watcher; \
|
||||
\
|
||||
for (__i = e->watchers_offset; \
|
||||
__i < (e)->target_offset; \
|
||||
__i += __watcher->watcher_size + \
|
||||
sizeof(struct compat_ebt_entry_mwt)) { \
|
||||
__watcher = (void *)(e) + __i; \
|
||||
__ret = fn(__watcher , ## args); \
|
||||
if (__ret != 0) \
|
||||
break; \
|
||||
} \
|
||||
if (__ret == 0) { \
|
||||
if (__i != (e)->target_offset) \
|
||||
__ret = -EINVAL; \
|
||||
} \
|
||||
__ret; \
|
||||
})
|
||||
|
||||
#define EBT_COMPAT_MATCH_ITERATE(e, fn, args...) \
|
||||
({ \
|
||||
unsigned int __i; \
|
||||
int __ret = 0; \
|
||||
struct compat_ebt_entry_mwt *__match; \
|
||||
\
|
||||
for (__i = sizeof(struct ebt_entry); \
|
||||
__i < (e)->watchers_offset; \
|
||||
__i += __match->match_size + \
|
||||
sizeof(struct compat_ebt_entry_mwt)) { \
|
||||
__match = (void *)(e) + __i; \
|
||||
__ret = fn(__match , ## args); \
|
||||
if (__ret != 0) \
|
||||
break; \
|
||||
} \
|
||||
if (__ret == 0) { \
|
||||
if (__i != (e)->watchers_offset) \
|
||||
__ret = -EINVAL; \
|
||||
} \
|
||||
__ret; \
|
||||
})
|
||||
|
||||
/* called for all ebt_entry structures. */
|
||||
static int size_entry_mwt(struct ebt_entry *entry, const unsigned char *base,
|
||||
unsigned int *total,
|
||||
@@ -2132,6 +2081,14 @@ static int size_entry_mwt(struct ebt_entry *entry, const unsigned char *base,
|
||||
}
|
||||
}
|
||||
|
||||
if (state->buf_kern_start == NULL) {
|
||||
unsigned int offset = buf_start - (char *) base;
|
||||
|
||||
ret = xt_compat_add_offset(NFPROTO_BRIDGE, offset, new_offset);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
startoff = state->buf_user_offset - startoff;
|
||||
|
||||
BUG_ON(*total < startoff);
|
||||
@@ -2240,6 +2197,7 @@ static int compat_do_replace(struct net *net, void __user *user,
|
||||
|
||||
xt_compat_lock(NFPROTO_BRIDGE);
|
||||
|
||||
xt_compat_init_offsets(NFPROTO_BRIDGE, tmp.nentries);
|
||||
ret = compat_copy_entries(entries_tmp, tmp.entries_size, &state);
|
||||
if (ret < 0)
|
||||
goto out_unlock;
|
||||
|
||||
+6
-4
@@ -1284,11 +1284,13 @@ static int dev_close_many(struct list_head *head)
|
||||
*/
|
||||
int dev_close(struct net_device *dev)
|
||||
{
|
||||
LIST_HEAD(single);
|
||||
if (dev->flags & IFF_UP) {
|
||||
LIST_HEAD(single);
|
||||
|
||||
list_add(&dev->unreg_list, &single);
|
||||
dev_close_many(&single);
|
||||
list_del(&single);
|
||||
list_add(&dev->unreg_list, &single);
|
||||
dev_close_many(&single);
|
||||
list_del(&single);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dev_close);
|
||||
|
||||
@@ -123,6 +123,8 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
|
||||
case DCCPO_CHANGE_L ... DCCPO_CONFIRM_R:
|
||||
if (pkt_type == DCCP_PKT_DATA) /* RFC 4340, 6 */
|
||||
break;
|
||||
if (len == 0)
|
||||
goto out_invalid_option;
|
||||
rc = dccp_feat_parse_options(sk, dreq, mandatory, opt,
|
||||
*value, value + 1, len - 1);
|
||||
if (rc)
|
||||
|
||||
@@ -93,6 +93,7 @@ struct bictcp {
|
||||
u32 ack_cnt; /* number of acks */
|
||||
u32 tcp_cwnd; /* estimated tcp cwnd */
|
||||
#define ACK_RATIO_SHIFT 4
|
||||
#define ACK_RATIO_LIMIT (32u << ACK_RATIO_SHIFT)
|
||||
u16 delayed_ack; /* estimate the ratio of Packets/ACKs << 4 */
|
||||
u8 sample_cnt; /* number of samples to decide curr_rtt */
|
||||
u8 found; /* the exit point is found? */
|
||||
@@ -398,8 +399,12 @@ static void bictcp_acked(struct sock *sk, u32 cnt, s32 rtt_us)
|
||||
u32 delay;
|
||||
|
||||
if (icsk->icsk_ca_state == TCP_CA_Open) {
|
||||
cnt -= ca->delayed_ack >> ACK_RATIO_SHIFT;
|
||||
ca->delayed_ack += cnt;
|
||||
u32 ratio = ca->delayed_ack;
|
||||
|
||||
ratio -= ca->delayed_ack >> ACK_RATIO_SHIFT;
|
||||
ratio += cnt;
|
||||
|
||||
ca->delayed_ack = min(ratio, ACK_RATIO_LIMIT);
|
||||
}
|
||||
|
||||
/* Some calls are for duplicates without timetamps */
|
||||
|
||||
@@ -69,7 +69,7 @@ int xfrm4_prepare_output(struct xfrm_state *x, struct sk_buff *skb)
|
||||
}
|
||||
EXPORT_SYMBOL(xfrm4_prepare_output);
|
||||
|
||||
static int xfrm4_output_finish(struct sk_buff *skb)
|
||||
int xfrm4_output_finish(struct sk_buff *skb)
|
||||
{
|
||||
#ifdef CONFIG_NETFILTER
|
||||
if (!skb_dst(skb)->xfrm) {
|
||||
@@ -86,7 +86,11 @@ static int xfrm4_output_finish(struct sk_buff *skb)
|
||||
|
||||
int xfrm4_output(struct sk_buff *skb)
|
||||
{
|
||||
struct dst_entry *dst = skb_dst(skb);
|
||||
struct xfrm_state *x = dst->xfrm;
|
||||
|
||||
return NF_HOOK_COND(NFPROTO_IPV4, NF_INET_POST_ROUTING, skb,
|
||||
NULL, skb_dst(skb)->dev, xfrm4_output_finish,
|
||||
NULL, dst->dev,
|
||||
x->outer_mode->afinfo->output_finish,
|
||||
!(IPCB(skb)->flags & IPSKB_REROUTED));
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user