Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266920
b: refs/heads/master
c: 1009075
h: refs/heads/master
v: v3
  • Loading branch information
Williams, Mitch A authored and Jeff Kirsher committed Oct 21, 2011
1 parent 866746b commit 19bddcb
Show file tree
Hide file tree
Showing 16 changed files with 46 additions and 92 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: 66b13d99d96a1a69f47a6bc3dc47f45955967377
refs/heads/master: 10090751c009f4b21a12cd64e96376757563fd4b
1 change: 0 additions & 1 deletion trunk/drivers/net/bonding/bond_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,6 @@ int bond_create_sysfs(struct bond_net *bn)
int ret;

bn->class_attr_bonding_masters = class_attr_bonding_masters;
sysfs_attr_init(&bn->class_attr_bonding_masters.attr);

ret = netdev_class_create_file(&bn->class_attr_bonding_masters);
/*
Expand Down
12 changes: 7 additions & 5 deletions trunk/drivers/net/ethernet/intel/igbvf/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
char igbvf_driver_name[] = "igbvf";
const char igbvf_driver_version[] = DRV_VERSION;
static const char igbvf_driver_string[] =
"Intel(R) Virtual Function Network Driver";
"Intel(R) Gigabit Virtual Function Network Driver";
static const char igbvf_copyright[] =
"Copyright (c) 2009 - 2010 Intel Corporation.";
"Copyright (c) 2009 - 2011 Intel Corporation.";

static int igbvf_poll(struct napi_struct *napi, int budget);
static void igbvf_reset(struct igbvf_adapter *);
Expand Down Expand Up @@ -2525,9 +2525,11 @@ static void igbvf_print_device_info(struct igbvf_adapter *adapter)
struct net_device *netdev = adapter->netdev;
struct pci_dev *pdev = adapter->pdev;

dev_info(&pdev->dev, "Intel(R) 82576 Virtual Function\n");
if (hw->mac.type == e1000_vfadapt_i350)
dev_info(&pdev->dev, "Intel(R) I350 Virtual Function\n");
else
dev_info(&pdev->dev, "Intel(R) 82576 Virtual Function\n");
dev_info(&pdev->dev, "Address: %pM\n", netdev->dev_addr);
dev_info(&pdev->dev, "MAC: %d\n", hw->mac.type);
}

static int igbvf_set_features(struct net_device *netdev, u32 features)
Expand Down Expand Up @@ -2864,7 +2866,7 @@ module_exit(igbvf_exit_module);


MODULE_AUTHOR("Intel Corporation, <e1000-devel@lists.sourceforge.net>");
MODULE_DESCRIPTION("Intel(R) 82576 Virtual Function Network Driver");
MODULE_DESCRIPTION("Intel(R) Gigabit Virtual Function Network Driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);

Expand Down
13 changes: 0 additions & 13 deletions trunk/drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,21 +877,8 @@ static void virtnet_vlan_rx_kill_vid(struct net_device *dev, u16 vid)
dev_warn(&dev->dev, "Failed to kill VLAN ID %d.\n", vid);
}

static void virtnet_get_ringparam(struct net_device *dev,
struct ethtool_ringparam *ring)
{
struct virtnet_info *vi = netdev_priv(dev);

ring->rx_max_pending = virtqueue_get_vring_size(vi->rvq);
ring->tx_max_pending = virtqueue_get_vring_size(vi->svq);
ring->rx_pending = ring->rx_max_pending;
ring->tx_pending = ring->tx_max_pending;

}

static const struct ethtool_ops virtnet_ethtool_ops = {
.get_link = ethtool_op_get_link,
.get_ringparam = virtnet_get_ringparam,
};

#define MIN_MTU 68
Expand Down
10 changes: 0 additions & 10 deletions trunk/drivers/virtio/virtio_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,14 +529,4 @@ void vring_transport_features(struct virtio_device *vdev)
}
EXPORT_SYMBOL_GPL(vring_transport_features);

/* return the size of the vring within the virtqueue */
unsigned int virtqueue_get_vring_size(struct virtqueue *_vq)
{

struct vring_virtqueue *vq = to_vvq(_vq);

return vq->vring.num;
}
EXPORT_SYMBOL_GPL(virtqueue_get_vring_size);

MODULE_LICENSE("GPL");
5 changes: 0 additions & 5 deletions trunk/include/linux/virtio.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ struct virtqueue {
* virtqueue_detach_unused_buf: detach first unused buffer
* vq: the struct virtqueue we're talking about.
* Returns NULL or the "data" token handed to add_buf
* virtqueue_get_vring_size: return the size of the virtqueue's vring
* vq: the struct virtqueue containing the vring of interest.
* Returns the size of the vring.
*
* Locking rules are straightforward: the driver is responsible for
* locking. No two operations may be invoked simultaneously, with the exception
Expand Down Expand Up @@ -100,8 +97,6 @@ bool virtqueue_enable_cb_delayed(struct virtqueue *vq);

void *virtqueue_detach_unused_buf(struct virtqueue *vq);

unsigned int virtqueue_get_vring_size(struct virtqueue *vq);

/**
* virtio_device - representation of a device using virtio
* @index: unique position on the virtio bus
Expand Down
8 changes: 0 additions & 8 deletions trunk/include/net/inet_ecn.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ static inline int INET_ECN_is_capable(__u8 dsfield)
return dsfield & INET_ECN_ECT_0;
}

/*
* RFC 3168 9.1.1
* The full-functionality option for ECN encapsulation is to copy the
* ECN codepoint of the inside header to the outside header on
* encapsulation if the inside header is not-ECT or ECT, and to set the
* ECN codepoint of the outside header to ECT(0) if the ECN codepoint of
* the inside header is CE.
*/
static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner)
{
outer &= ~INET_ECN_MASK;
Expand Down
3 changes: 1 addition & 2 deletions trunk/include/net/inet_timewait_sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ struct inet_timewait_sock {
/* And these are ours. */
unsigned int tw_ipv6only : 1,
tw_transparent : 1,
tw_pad : 6, /* 6 bits hole */
tw_tos : 8,
tw_pad : 14, /* 14 bits hole */
tw_ipv6_offset : 16;
kmemcheck_bitfield_end(flags);
unsigned long tw_ttd;
Expand Down
3 changes: 1 addition & 2 deletions trunk/include/net/ip.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ struct ip_reply_arg {
int csumoffset; /* u16 offset of csum in iov[0].iov_base */
/* -1 if not needed */
int bound_dev_if;
u8 tos;
};

#define IP_REPLY_ARG_NOSRCCHECK 1
Expand All @@ -176,7 +175,7 @@ static inline __u8 ip_reply_arg_flowi_flags(const struct ip_reply_arg *arg)
}

void ip_send_reply(struct sock *sk, struct sk_buff *skb, __be32 daddr,
const struct ip_reply_arg *arg, unsigned int len);
struct ip_reply_arg *arg, unsigned int len);

struct ipv4_config {
int log_martians;
Expand Down
19 changes: 9 additions & 10 deletions trunk/include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1185,9 +1185,8 @@ struct tcp_md5sig_pool {

/* - functions */
extern int tcp_v4_md5_hash_skb(char *md5_hash, struct tcp_md5sig_key *key,
const struct sock *sk,
const struct request_sock *req,
const struct sk_buff *skb);
struct sock *sk, struct request_sock *req,
struct sk_buff *skb);
extern struct tcp_md5sig_key * tcp_v4_md5_lookup(struct sock *sk,
struct sock *addr_sk);
extern int tcp_v4_md5_do_add(struct sock *sk, __be32 addr, u8 *newkey,
Expand All @@ -1210,7 +1209,7 @@ extern void tcp_free_md5sig_pool(void);
extern struct tcp_md5sig_pool *tcp_get_md5sig_pool(void);
extern void tcp_put_md5sig_pool(void);

extern int tcp_md5_hash_header(struct tcp_md5sig_pool *, const struct tcphdr *);
extern int tcp_md5_hash_header(struct tcp_md5sig_pool *, struct tcphdr *);
extern int tcp_md5_hash_skb_data(struct tcp_md5sig_pool *, const struct sk_buff *,
unsigned header_len);
extern int tcp_md5_hash_key(struct tcp_md5sig_pool *hp,
Expand Down Expand Up @@ -1449,9 +1448,9 @@ struct tcp_sock_af_ops {
struct sock *addr_sk);
int (*calc_md5_hash) (char *location,
struct tcp_md5sig_key *md5,
const struct sock *sk,
const struct request_sock *req,
const struct sk_buff *skb);
struct sock *sk,
struct request_sock *req,
struct sk_buff *skb);
int (*md5_add) (struct sock *sk,
struct sock *addr_sk,
u8 *newkey,
Expand All @@ -1468,9 +1467,9 @@ struct tcp_request_sock_ops {
struct request_sock *req);
int (*calc_md5_hash) (char *location,
struct tcp_md5sig_key *md5,
const struct sock *sk,
const struct request_sock *req,
const struct sk_buff *skb);
struct sock *sk,
struct request_sock *req,
struct sk_buff *skb);
#endif
};

Expand Down
1 change: 0 additions & 1 deletion trunk/net/ipv4/inet_timewait_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, const int stat
tw->tw_daddr = inet->inet_daddr;
tw->tw_rcv_saddr = inet->inet_rcv_saddr;
tw->tw_bound_dev_if = sk->sk_bound_dev_if;
tw->tw_tos = inet->tos;
tw->tw_num = inet->inet_num;
tw->tw_state = TCP_TIME_WAIT;
tw->tw_substate = state;
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/ipv4/ip_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ static int ip_reply_glue_bits(void *dptr, char *to, int offset,
* structure to pass arguments.
*/
void ip_send_reply(struct sock *sk, struct sk_buff *skb, __be32 daddr,
const struct ip_reply_arg *arg, unsigned int len)
struct ip_reply_arg *arg, unsigned int len)
{
struct inet_sock *inet = inet_sk(sk);
struct ip_options_data replyopts;
Expand All @@ -1489,7 +1489,7 @@ void ip_send_reply(struct sock *sk, struct sk_buff *skb, __be32 daddr,
}

flowi4_init_output(&fl4, arg->bound_dev_if, 0,
RT_TOS(arg->tos),
RT_TOS(ip_hdr(skb)->tos),
RT_SCOPE_UNIVERSE, sk->sk_protocol,
ip_reply_arg_flowi_flags(arg),
daddr, rt->rt_spec_dst,
Expand All @@ -1506,7 +1506,7 @@ void ip_send_reply(struct sock *sk, struct sk_buff *skb, __be32 daddr,
with locally disabled BH and that sk cannot be already spinlocked.
*/
bh_lock_sock(sk);
inet->tos = arg->tos;
inet->tos = ip_hdr(skb)->tos;
sk->sk_priority = skb->priority;
sk->sk_protocol = ip_hdr(skb)->protocol;
sk->sk_bound_dev_if = arg->bound_dev_if;
Expand Down
5 changes: 2 additions & 3 deletions trunk/net/ipv4/ip_sockglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <linux/netfilter.h>
#include <linux/route.h>
#include <linux/mroute.h>
#include <net/inet_ecn.h>
#include <net/route.h>
#include <net/xfrm.h>
#include <net/compat.h>
Expand Down Expand Up @@ -579,8 +578,8 @@ static int do_ip_setsockopt(struct sock *sk, int level,
break;
case IP_TOS: /* This sets both TOS and Precedence */
if (sk->sk_type == SOCK_STREAM) {
val &= ~INET_ECN_MASK;
val |= inet->tos & INET_ECN_MASK;
val &= ~3;
val |= inet->tos & 3;
}
if (inet->tos != val) {
inet->tos = val;
Expand Down
14 changes: 6 additions & 8 deletions trunk/net/ipv4/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2994,19 +2994,17 @@ void tcp_put_md5sig_pool(void)
EXPORT_SYMBOL(tcp_put_md5sig_pool);

int tcp_md5_hash_header(struct tcp_md5sig_pool *hp,
const struct tcphdr *th)
struct tcphdr *th)
{
struct scatterlist sg;
struct tcphdr hdr;
int err;

/* We are not allowed to change tcphdr, make a local copy */
memcpy(&hdr, th, sizeof(hdr));
hdr.check = 0;

__sum16 old_checksum = th->check;
th->check = 0;
/* options aren't included in the hash */
sg_init_one(&sg, &hdr, sizeof(hdr));
err = crypto_hash_update(&hp->md5_desc, &sg, sizeof(hdr));
sg_init_one(&sg, th, sizeof(struct tcphdr));
err = crypto_hash_update(&hp->md5_desc, &sg, sizeof(struct tcphdr));
th->check = old_checksum;
return err;
}
EXPORT_SYMBOL(tcp_md5_hash_header);
Expand Down
23 changes: 10 additions & 13 deletions trunk/net/ipv4/tcp_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ EXPORT_SYMBOL(sysctl_tcp_low_latency);
static struct tcp_md5sig_key *tcp_v4_md5_do_lookup(struct sock *sk,
__be32 addr);
static int tcp_v4_md5_hash_hdr(char *md5_hash, struct tcp_md5sig_key *key,
__be32 daddr, __be32 saddr, const struct tcphdr *th);
__be32 daddr, __be32 saddr, struct tcphdr *th);
#else
static inline
struct tcp_md5sig_key *tcp_v4_md5_do_lookup(struct sock *sk, __be32 addr)
Expand Down Expand Up @@ -652,7 +652,6 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb)
arg.flags = (sk && inet_sk(sk)->transparent) ? IP_REPLY_ARG_NOSRCCHECK : 0;

net = dev_net(skb_dst(skb)->dev);
arg.tos = ip_hdr(skb)->tos;
ip_send_reply(net->ipv4.tcp_sock, skb, ip_hdr(skb)->saddr,
&arg, arg.iov[0].iov_len);

Expand All @@ -667,7 +666,7 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb)
static void tcp_v4_send_ack(struct sk_buff *skb, u32 seq, u32 ack,
u32 win, u32 ts, int oif,
struct tcp_md5sig_key *key,
int reply_flags, u8 tos)
int reply_flags)
{
const struct tcphdr *th = tcp_hdr(skb);
struct {
Expand Down Expand Up @@ -727,7 +726,7 @@ static void tcp_v4_send_ack(struct sk_buff *skb, u32 seq, u32 ack,
arg.csumoffset = offsetof(struct tcphdr, check) / 2;
if (oif)
arg.bound_dev_if = oif;
arg.tos = tos;

ip_send_reply(net->ipv4.tcp_sock, skb, ip_hdr(skb)->saddr,
&arg, arg.iov[0].iov_len);

Expand All @@ -744,8 +743,7 @@ static void tcp_v4_timewait_ack(struct sock *sk, struct sk_buff *skb)
tcptw->tw_ts_recent,
tw->tw_bound_dev_if,
tcp_twsk_md5_key(tcptw),
tw->tw_transparent ? IP_REPLY_ARG_NOSRCCHECK : 0,
tw->tw_tos
tw->tw_transparent ? IP_REPLY_ARG_NOSRCCHECK : 0
);

inet_twsk_put(tw);
Expand All @@ -759,8 +757,7 @@ static void tcp_v4_reqsk_send_ack(struct sock *sk, struct sk_buff *skb,
req->ts_recent,
0,
tcp_v4_md5_do_lookup(sk, ip_hdr(skb)->daddr),
inet_rsk(req)->no_srccheck ? IP_REPLY_ARG_NOSRCCHECK : 0,
ip_hdr(skb)->tos);
inet_rsk(req)->no_srccheck ? IP_REPLY_ARG_NOSRCCHECK : 0);
}

/*
Expand Down Expand Up @@ -1093,7 +1090,7 @@ static int tcp_v4_md5_hash_pseudoheader(struct tcp_md5sig_pool *hp,
}

static int tcp_v4_md5_hash_hdr(char *md5_hash, struct tcp_md5sig_key *key,
__be32 daddr, __be32 saddr, const struct tcphdr *th)
__be32 daddr, __be32 saddr, struct tcphdr *th)
{
struct tcp_md5sig_pool *hp;
struct hash_desc *desc;
Expand Down Expand Up @@ -1125,12 +1122,12 @@ static int tcp_v4_md5_hash_hdr(char *md5_hash, struct tcp_md5sig_key *key,
}

int tcp_v4_md5_hash_skb(char *md5_hash, struct tcp_md5sig_key *key,
const struct sock *sk, const struct request_sock *req,
const struct sk_buff *skb)
struct sock *sk, struct request_sock *req,
struct sk_buff *skb)
{
struct tcp_md5sig_pool *hp;
struct hash_desc *desc;
const struct tcphdr *th = tcp_hdr(skb);
struct tcphdr *th = tcp_hdr(skb);
__be32 saddr, daddr;

if (sk) {
Expand Down Expand Up @@ -1175,7 +1172,7 @@ int tcp_v4_md5_hash_skb(char *md5_hash, struct tcp_md5sig_key *key,
}
EXPORT_SYMBOL(tcp_v4_md5_hash_skb);

static int tcp_v4_inbound_md5_hash(struct sock *sk, const struct sk_buff *skb)
static int tcp_v4_inbound_md5_hash(struct sock *sk, struct sk_buff *skb)
{
/*
* This gets called for each TCP segment that arrives
Expand Down
Loading

0 comments on commit 19bddcb

Please sign in to comment.