Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351652
b: refs/heads/master
c: 031554e
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jan 27, 2013
1 parent aa673b7 commit f6fd44b
Show file tree
Hide file tree
Showing 51 changed files with 1,553 additions and 474 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: b876a744a228308ecf75466831453f0863d253db
refs/heads/master: 031554eab078705edb96e9a39665597e3fd22781
176 changes: 176 additions & 0 deletions trunk/Documentation/networking/nf_conntrack-sysctl.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
/proc/sys/net/netfilter/nf_conntrack_* Variables:

nf_conntrack_acct - BOOLEAN
0 - disabled (default)
not 0 - enabled

Enable connection tracking flow accounting. 64-bit byte and packet
counters per flow are added.

nf_conntrack_buckets - INTEGER (read-only)
Size of hash table. If not specified as parameter during module
loading, the default size is calculated by dividing total memory
by 16384 to determine the number of buckets but the hash table will
never have fewer than 32 or more than 16384 buckets.

nf_conntrack_checksum - BOOLEAN
0 - disabled
not 0 - enabled (default)

Verify checksum of incoming packets. Packets with bad checksums are
in INVALID state. If this is enabled, such packets will not be
considered for connection tracking.

nf_conntrack_count - INTEGER (read-only)
Number of currently allocated flow entries.

nf_conntrack_events - BOOLEAN
0 - disabled
not 0 - enabled (default)

If this option is enabled, the connection tracking code will
provide userspace with connection tracking events via ctnetlink.

nf_conntrack_events_retry_timeout - INTEGER (seconds)
default 15

This option is only relevant when "reliable connection tracking
events" are used. Normally, ctnetlink is "lossy", that is,
events are normally dropped when userspace listeners can't keep up.

Userspace can request "reliable event mode". When this mode is
active, the conntrack will only be destroyed after the event was
delivered. If event delivery fails, the kernel periodically
re-tries to send the event to userspace.

This is the maximum interval the kernel should use when re-trying
to deliver the destroy event.

A higher number means there will be fewer delivery retries and it
will take longer for a backlog to be processed.

nf_conntrack_expect_max - INTEGER
Maximum size of expectation table. Default value is
nf_conntrack_buckets / 256. Minimum is 1.

nf_conntrack_frag6_high_thresh - INTEGER
default 262144

Maximum memory used to reassemble IPv6 fragments. When
nf_conntrack_frag6_high_thresh bytes of memory is allocated for this
purpose, the fragment handler will toss packets until
nf_conntrack_frag6_low_thresh is reached.

nf_conntrack_frag6_low_thresh - INTEGER
default 196608

See nf_conntrack_frag6_low_thresh

nf_conntrack_frag6_timeout - INTEGER (seconds)
default 60

Time to keep an IPv6 fragment in memory.

nf_conntrack_generic_timeout - INTEGER (seconds)
default 600

Default for generic timeout. This refers to layer 4 unknown/unsupported
protocols.

nf_conntrack_helper - BOOLEAN
0 - disabled
not 0 - enabled (default)

Enable automatic conntrack helper assignment.

nf_conntrack_icmp_timeout - INTEGER (seconds)
default 30

Default for ICMP timeout.

nf_conntrack_icmpv6_timeout - INTEGER (seconds)
default 30

Default for ICMP6 timeout.

nf_conntrack_log_invalid - INTEGER
0 - disable (default)
1 - log ICMP packets
6 - log TCP packets
17 - log UDP packets
33 - log DCCP packets
41 - log ICMPv6 packets
136 - log UDPLITE packets
255 - log packets of any protocol

Log invalid packets of a type specified by value.

nf_conntrack_max - INTEGER
Size of connection tracking table. Default value is
nf_conntrack_buckets value * 4.

nf_conntrack_tcp_be_liberal - BOOLEAN
0 - disabled (default)
not 0 - enabled

Be conservative in what you do, be liberal in what you accept from others.
If it's non-zero, we mark only out of window RST segments as INVALID.

nf_conntrack_tcp_loose - BOOLEAN
0 - disabled
not 0 - enabled (default)

If it is set to zero, we disable picking up already established
connections.

nf_conntrack_tcp_max_retrans - INTEGER
default 3

Maximum number of packets that can be retransmitted without
received an (acceptable) ACK from the destination. If this number
is reached, a shorter timer will be started.

nf_conntrack_tcp_timeout_close - INTEGER (seconds)
default 10

nf_conntrack_tcp_timeout_close_wait - INTEGER (seconds)
default 60

nf_conntrack_tcp_timeout_established - INTEGER (seconds)
default 432000 (5 days)

nf_conntrack_tcp_timeout_fin_wait - INTEGER (seconds)
default 120

nf_conntrack_tcp_timeout_last_ack - INTEGER (seconds)
default 30

nf_conntrack_tcp_timeout_max_retrans - INTEGER (seconds)
default 300

nf_conntrack_tcp_timeout_syn_recv - INTEGER (seconds)
default 60

nf_conntrack_tcp_timeout_syn_sent - INTEGER (seconds)
default 120

nf_conntrack_tcp_timeout_time_wait - INTEGER (seconds)
default 120

nf_conntrack_tcp_timeout_unacknowledged - INTEGER (seconds)
default 300

nf_conntrack_timestamp - BOOLEAN
0 - disabled (default)
not 0 - enabled

Enable connection tracking flow timestamping.

nf_conntrack_udp_timeout - INTEGER (seconds)
default 30

nf_conntrack_udp_timeout_stream2 - INTEGER (seconds)
default 180

This extended timeout will be used in case there is an UDP stream
detected.
1 change: 0 additions & 1 deletion trunk/arch/mips/include/uapi/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
socket to transmit pending data. */
#define SO_OOBINLINE 0x0100 /* Receive out-of-band data in-band. */
#define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */
#endif

#define SO_TYPE 0x1008 /* Compatible name for SO_STYLE. */
#define SO_STYLE SO_TYPE /* Synonym */
Expand Down
20 changes: 16 additions & 4 deletions trunk/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
#include "qlcnic_83xx_hw.h"

#define _QLCNIC_LINUX_MAJOR 5
#define _QLCNIC_LINUX_MINOR 0
#define _QLCNIC_LINUX_SUBVERSION 31
#define QLCNIC_LINUX_VERSIONID "5.1.31"
#define _QLCNIC_LINUX_MINOR 1
#define _QLCNIC_LINUX_SUBVERSION 32
#define QLCNIC_LINUX_VERSIONID "5.1.32"
#define QLCNIC_DRV_IDC_VER 0x01
#define QLCNIC_DRIVER_VERSION ((_QLCNIC_LINUX_MAJOR << 16) |\
(_QLCNIC_LINUX_MINOR << 8) | (_QLCNIC_LINUX_SUBVERSION))
Expand Down Expand Up @@ -436,6 +436,7 @@ struct qlcnic_hardware_context {
u16 act_pci_func;

u32 capabilities;
u32 capabilities2;
u32 temp;
u32 int_vec_bit;
u32 fw_hal_version;
Expand Down Expand Up @@ -745,6 +746,11 @@ struct qlcnic_mac_list_s {
uint8_t mac_addr[ETH_ALEN+2];
};

/* MAC Learn */
#define NO_MAC_LEARN 0
#define DRV_MAC_LEARN 1
#define FDB_MAC_LEARN 2

#define QLCNIC_HOST_REQUEST 0x13
#define QLCNIC_REQUEST 0x14

Expand Down Expand Up @@ -798,6 +804,8 @@ struct qlcnic_mac_list_s {
#define QLCNIC_FW_CAPABILITY_MORE_CAPS BIT_31

#define QLCNIC_FW_CAPABILITY_2_LRO_MAX_TCP_SEG BIT_2
#define QLCNIC_FW_CAP2_HW_LRO_IPV6 BIT_3
#define QLCNIC_FW_CAPABILITY_2_OCBB BIT_5

/* module types */
#define LINKEVENT_MODULE_NOT_PRESENT 1
Expand Down Expand Up @@ -978,7 +986,8 @@ struct qlcnic_adapter {
u8 mac_addr[ETH_ALEN];

u64 dev_rst_time;
u8 mac_learn;
bool drv_mac_learn;
bool fdb_mac_learn;
unsigned long vlans[BITS_TO_LONGS(VLAN_N_VID)];
u8 flash_mfg_id;
struct qlcnic_npar_info *npars;
Expand Down Expand Up @@ -1418,9 +1427,12 @@ void qlcnic_post_rx_buffers(struct qlcnic_adapter *adapter,
struct qlcnic_host_rds_ring *rds_ring, u8 ring_id);
int qlcnic_process_rcv_ring(struct qlcnic_host_sds_ring *sds_ring, int max);
void qlcnic_set_multi(struct net_device *netdev);
int qlcnic_nic_add_mac(struct qlcnic_adapter *, const u8 *);
int qlcnic_nic_del_mac(struct qlcnic_adapter *, const u8 *);
void qlcnic_free_mac_list(struct qlcnic_adapter *adapter);

int qlcnic_fw_cmd_set_mtu(struct qlcnic_adapter *adapter, int mtu);
int qlcnic_fw_cmd_set_drv_version(struct qlcnic_adapter *);
int qlcnic_change_mtu(struct net_device *netdev, int new_mtu);
netdev_features_t qlcnic_fix_features(struct net_device *netdev,
netdev_features_t features);
Expand Down
31 changes: 31 additions & 0 deletions trunk/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,37 @@ int qlcnic_82xx_issue_cmd(struct qlcnic_adapter *adapter,
return cmd->rsp.arg[0];
}

int qlcnic_fw_cmd_set_drv_version(struct qlcnic_adapter *adapter)
{
struct qlcnic_cmd_args cmd;
u32 arg1, arg2, arg3;
char drv_string[12];
int err = 0;

memset(drv_string, 0, sizeof(drv_string));
snprintf(drv_string, sizeof(drv_string), "%d"".""%d"".""%d",
_QLCNIC_LINUX_MAJOR, _QLCNIC_LINUX_MINOR,
_QLCNIC_LINUX_SUBVERSION);

qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_SET_DRV_VER);
memcpy(&arg1, drv_string, sizeof(u32));
memcpy(&arg2, drv_string + 4, sizeof(u32));
memcpy(&arg3, drv_string + 8, sizeof(u32));

cmd.req.arg[1] = arg1;
cmd.req.arg[2] = arg2;
cmd.req.arg[3] = arg3;

err = qlcnic_issue_cmd(adapter, &cmd);
if (err) {
dev_info(&adapter->pdev->dev,
"Failed to set driver version in firmware\n");
return -EIO;
}

return 0;
}

int
qlcnic_fw_cmd_set_mtu(struct qlcnic_adapter *adapter, int mtu)
{
Expand Down
Loading

0 comments on commit f6fd44b

Please sign in to comment.