x_mtu to 0. So that dev_set_mtu() will not check the mtu range,
and can be set with any value.
CC: Eric Dumazet <eduma...@google.com>
CC: Sabrina Dubroca <s...@queasysnail.net>
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/dummy.c | 2 +-
drivers/
:ff:ff
This patch adds device MTU validation check.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/ifb.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index 8870bd2..ce84ad2 100644
--- a/drivers/net/ifb.c
+++ b
ce brd ff:ff:ff:ff:ff:ff
This patch adds device MTU validation check.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/dummy.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
index e31ab3b..0276b2b 100644
--- a
This patch serial add device MTU validation check, so that only valid mtu value
can be set when adding new device.
Zhang Shengju (2):
dummy: add device MTU validation check
ifb: add device MTU validation check
drivers/net/dummy.c | 8
drivers/net/ifb.c | 8
2 files
This patch checks data first at one place, return if it's null.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/macvlan.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index d
This patch adds a new function igb_get_max_rss_queues() to get maximum
RSS queues, this will reduce duplicate code and facilitate future
maintenance.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/ethernet/intel/igb/igb.h | 1 +
drivers/net/et
Dummy device name is enumerated by the kernel, let user space be aware
of the naming scheme used by dummy devices:
(visible in /sys/class/net//name_assign_type).
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/dummy.c | 2 +-
1 file changed, 1 insertion
Replace shift instead of expensive divide.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/ethernet/emulex/benet/be_main.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c
b/drive
This patch adds a new function igb_get_max_rss_queues() to get maximum
RSS queues, this will reduce duplicate code and facilitate future
maintenance.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/ethernet/intel/igb/igb.h | 1 +
drivers/net/et
The macvlan dev should propagate the return value of mac address change for
lower device in the passthru mode, instead of always return 0.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/macvlan.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
Remove unnecessary set of flag IFF_BROADCAST, since ether_setup
already does this.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/fjes/fjes_main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_
Add a new macro MODULE_ALIAS_VPORT_TYPE to unify and simplify the
declaration of vport type alias.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/openvswitch/vport-geneve.c | 2 +-
net/openvswitch/vport-gre.c| 2 +-
net/openvswitch/vport-vxlan.c | 2 +
Add a new macro MODULE_ALIAS_VPORT_TYPE to unify and simplify the
declaration of vport type alias, and replace magic numbers with
symbolic constants.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/openvswitch/vport-geneve.c | 2 +-
net/openvswitch/vport-gre.c
Add a new macro MODULE_ALIAS_TEAM_MODE to unify and simplify the
declaration of team mode alias.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/team/team_mode_activebackup.c | 2 +-
drivers/net/team/team_mode_broadcast.c| 2 +-
drivers/ne
Since register_netdevice() already call add_device_randomness() and
dev_set_mac_address() will call it after mac address change.
It's not necessary to call at device UP.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/core/dev.c | 1 -
1 file changed, 1 deletion(-)
Since register_netdevice() already call add_device_randomness() and
dev_set_mac_address() will call it after mac address change.
It's not necessary to call at device UP.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/core/dev.c | 1 -
1 file changed, 1 deletion(-)
Since netif_carrier_on() will do nothing if device's carrier is already
on, so it's unnecessary to do carrier status check.
It's the same for netif_carrier_off().
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/core/dev.c | 11 ---
1 file changed, 4 inse
Add support to set IFLA_CARRIER attribute.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
ip/iplink.c | 12
1 file changed, 12 insertions(+)
diff --git a/ip/iplink.c b/ip/iplink.c
index 866ad72..263bfdd 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -72,6
This patch updates the comment for netif_dormant() function to reflect
the intended usage.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
include/linux/netdevice.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/netdevice.h b/i
Remove first zero for add, and use full attribute name in comments.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/macsec.c | 25 -
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/drivers/net/macsec.c b/drive
After commit 61e84623ace3 ("net: centralize net_device min/max MTU checking"),
the mtu range for dummy device becomes [68, 1500].
This patch extends it to [0, 65535].
v2
- fix typo in commit message
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers
After commit 61e84623ace3 ("net: centralize net_device min/max MTU checking"),
the mtu range for dummy device becomes [68, 1500].
This patch expends it to [0, 65535].
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/dummy.c | 3 +++
1 file chang
Since commit 61e84623ace3 ("net: centralize net_device min/max MTU checking"),
mtu range is checked at dev_set_mtu().
This patch adds min_mtu for nlmon device and remove unnecessary
ndo_change_mtu() function.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
Currently, icmp_rcv() always return zero on a packet delivery upcall.
To make its behavior more compliant with the way this API should be
used, this patch changes this to let it return NET_RX_SUCCESS when the
packet is proper handled, and NET_RX_DROP otherwise.
Signed-off-by: Zhang Shengju
Since offset is zero, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 +-
Since offset is zero, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/ethernet/mellanox/mlx4/en_selftest.c | 2 +-
Since offset is zero, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/ethernet/qlogic/qede/qede_main.c | 2 +-
1 file c
This patch serial replace 'set' function to 'reset', since the offset is zero.
It's not necessary to use set, reset function is straightforward, and will
remove the unnecessary add operation in set function.
Zhang Shengju (5):
qede: use reset to set network header
bnx2x: use reset to set
Since offset is zero, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/staging/wilc1000/linux_mon.c | 4 ++--
1 file chan
Since offset is zero, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 2 +-
1 file c
Before this patch, function ndo_dflt_fdb_dump() will always return code
from uc fdb dump. The reture code of mc fdb dump is lost.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/core/rtnetlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ne
to be scanned
mulitple
times.
This patch make idx as the absolute index in the list, it will increase no
matter
whether the neigh is filtered. This will prevent the above problem.
And this is in line with other dump functions.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.
This patch replaces printk() with netdev_err() for macvtap device.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/macvtap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index 5da9861..2
Loop index in neigh dump function is not updated correctly under some
circumstances, this patch will fix it.
Fixes: 16660f0bd9 ("net: Add support for filtering neigh dump by device index")
Fixes: 21fdd092ac ("net: Add support for filtering neigh dump by master device")
Add missing team and team_slave link type.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
ip/iplink.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ip/iplink.c b/ip/iplink.c
index a8b49c5..1e603e7 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@
Loop index in neigh dump function is not updated correctly under some
circumstances, this patch will fix it.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/core/neighbour.c | 39 ++-
1 file changed, 18 insertions(+), 21 del
-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/core/rtnetlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index f4b9350..09e115b 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2734,7 +
This patch reduce the size of message sent to kernel space. Before this
patch, for command: 'ip link show', we will sent 1056 bytes. With this
patch, we only need to send 40 bytes.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
lib/libnetlink.c | 2 +-
1 file chan
If the link is filtered out, loop index should also be updated. If not,
loop index will not be correct.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/core/rtnetlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/rtnetlink.c b/ne
CAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group
default qlen 1000
link/ether 4e:3b:d3:6c:f0:e6 brd ff:ff:ff:ff:ff:ff
12: dummy1: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group
test qlen 1000
link/ether d6:9c:a4:1f:e7:e5 brd ff:ff:ff:ff:ff:ff
Sign
Set name_assign_type of internal port to NET_NAME_USER.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/openvswitch/vport-internal_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/openvswitch/vport-internal_dev.c
b/net/openvswitch
Bond device gets it's mac address from the first slave device, it's not
necessary to set slave device's mac address to bond if equal.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/bonding/bond_main.c | 5 +++--
1 file changed, 3 insertions(+), 2 del
This patch moves output message before setting slave to inactive, this will
print the correct status of slave device.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/bonding/bond_main.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff
This patch series remove duplicate set of flag IFF_MULTICAST.
Zhang Shengju (2):
bonding: remove duplicate set of flag IFF_MULTICAST
team: remove duplicate set of flag IFF_MULTICAST
drivers/net/bonding/bond_main.c | 2 +-
drivers/net/team/team.c | 1 -
2 files changed, 1 insertion
Remove unnecessary set of flag IFF_MULTICAST, since ether_setup
already does this.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/team/team.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 2
Remove unnecessary set of flag IFF_MULTICAST, since ether_setup
already does this.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/bonding/bond_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bonding/bond_main.c b/d
Fix a comment typo.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
include/uapi/linux/if.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/if.h b/include/uapi/linux/if.h
index 9cf2394..f802775 100644
--- a/include/uapi/linux/if.h
Update this manual to add attributes proxy_neigh and
ignore_routes_with_linkdown.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
man/man8/ip-netconf.8 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/man8/ip-netconf.8 b/man/man8/ip-netconf.8
This patch series add support for ignore route attribute.
v1->v2:
- update manual
- use rta_getattr_* instead of RTA_DATA
- fix code styles
Zhang Shengju (2):
netconf: add support for ignore route attribute
man: update netconf manual for new attributes
ip/ipnetconf.c|
Add support for ignore route attribute, and refine the code to use
rta_getattr_* function to get attribute value.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
ip/ipnetconf.c | 25 +
1 file changed, 17 insertions(+), 8 deletions(-)
diff --gi
Add support for ignore_routes_with_linkdown attribute.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
ip/ipnetconf.c | 4
1 file changed, 4 insertions(+)
diff --git a/ip/ipnetconf.c b/ip/ipnetconf.c
index eca6eee..6fec818 100644
--- a/ip/ipnetconf.c
++
This patch adds macro NETCONFA_ALL to represent all type of netconf
attributes for IPv4 and IPv6.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
include/uapi/linux/netconf.h | 1 +
net/ipv4/devinet.c | 40 +++-
ne
Add macro IN_DEV_DROP_GRATUITOUS_ARP to facilitate getting
drop_gratuitous_arp value.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
include/linux/inetdevice.h | 3 +++
net/ipv4/arp.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/i
led, call kfree_skb() instead of consume_skb(), then
return the correct return value.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/ipv4/arp.c | 35 ---
1 file changed, 20 insertions(+), 15 deletions(-)
diff --git a/net/ipv4/arp.c b
Since offset is zero, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/wireless/util.c | 2 +-
1 file changed, 1 insertion
Since offset is zero, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/wireless/mac80211_hwsim.c | 4 ++--
1 file chan
This patch series replace set function with reset when offset is zero.
Changes since v1:
- fix typo in commit message
Zhang Shengju (4):
vxlan: use reset to set header pointers
mac80211_hwsim: use reset to set mac header
mac80211: use reset to set header pointer
wireless: use reset
Since offset is zero, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add operation
in set function.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/vxlan.c | 6 +++---
1 file changed, 3 insertions
Since offset is zero, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/mac80211/mesh_hwmp.c | 6 +++---
net/mac80211/rx.c
This patch series replace set function with reset when offset is zero.
Zhang Shengju (4):
vxlan: use reset to set header pointers
mac80211_hwsim: use reset to set mac header
mac80211: use reset to set header pointer
wireless: use reset to set mac header
drivers/net/vxlan.c
Since offset is zeor, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/wireless/mac80211_hwsim.c | 4 ++--
1 file chan
Since offset is zeor, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/mac80211/mesh_hwmp.c | 6 +++---
net/mac80211/rx.c
Since offset is zeor, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add operation
in set function.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/vxlan.c | 6 +++---
1 file changed, 3 insertions
Since offset is zeor, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/wireless/util.c | 2 +-
1 file changed, 1 insertion
Currently, arp_rcv() always return zero on a packet delivery upcall.
To make its behavior more compliant with the way this API should be
used, this patch changes this to let it return NET_RX_SUCCESS when the
packet is proper handled, and NET_RX_DROP otherwise.
Signed-off-by: Zhang Shengju
If skb_reorder_vlan_header() failed, skb is freed and NULL is returned.
Then at skb_vlan_untag(), it will free skbuff again which cause double free.
This patch removes kfree_skb() call in function skb_reorder_vlan_header().
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.
If skb_reorder_vlan_header() failed, skb is freed and NULL is returned.
Then at skb_vlan_untag(), it will free skbuff again which cause double
free.
This patch removes kfree_skb() call in function skb_reorder_vlan_header().
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.
Since offset is zero, it's not necessary to use set function.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/core/pktgen.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 1474cfd..20999aa
needlessly. If underlying device does not
support unicast filtering, that device will enter promiscuous mode.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/8021q/vlan.c | 1 -
net/8021q/vlan_dev.c | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff
Since function vlan_proc_rem_dev() will only return 0, it's better to
return void instead of int.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/8021q/vlanproc.c | 3 +--
net/8021q/vlanproc.h | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git
Since function vlan_proc_rem_dev() will only return 0, it's better to
return void instead of int.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
net/8021q/vlanproc.c | 3 +--
net/8021q/vlanproc.h | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git
Use IFF_NO_QUEUE to indicate that a device can run without a qdisc.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/macvlan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 94e6888..4
for the following three places, they changed neither bond
mac address nor type. It's straightforward to return directly.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/bonding/bond_main.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff
Replace 'goto' with 'return' to remove unnecessary check at label:
err_undo_flags.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/bonding/bond_main.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/bonding/bond_ma
netdev_dbg() will add bond device name, it will be helpful if we print
slave device name.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/bonding/bond_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bonding/bond_ma
remove some redudant brackets, use sizeof(*) instead of sizeof(struct x).
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/bonding/bond_main.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/d
:
'i40e_add_geneve_port' defined but not used [-Wunused-function]
drivers/net/ethernet/intel/i40e/i40e_main.c:8651:13: warning:
'i40e_del_geneve_port' defined but not used [-Wunused-function]
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
drivers/net/ethernet/intel/i40e/i40e_main.
the warning was:
iproute.c:301:12: warning: 'val' may be used uninitialized in this
function [-Wmaybe-uninitialized]
features &= ~RTAX_FEATURE_ECN;
^
iproute.c:575:10: note: 'val' was declared here
__u32 val;
^
Signed-off-by: Zhang Shengju <zh
Remove unnecessary retrun, because invarg() exit.
Signed-off-by: Zhang Shengju zhangshen...@cmss.chinamobile.com
---
ip/iplink_bridge.c | 30 --
1 file changed, 12 insertions(+), 18 deletions(-)
diff --git a/ip/iplink_bridge.c b/ip/iplink_bridge.c
index e704e29
Enhance promtp message for 'spoofchk' and 'query_rss' flag, and fix a
typo.
Signed-off-by: Zhang Shengju zhangshen...@cmss.chinamobile.com
---
ip/iplink.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ip/iplink.c b/ip/iplink.c
index 1836889..520f750 100644
--- a/ip
Add missing return value to fix warnings
Signed-off-by: Zhang Shengju zhangshen...@cmss.chinamobile.com
---
include/utils.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/utils.h b/include/utils.h
index 95d162c..0c57ccd 100644
--- a/include/utils.h
+++ b/include
Add missing file close.
Signed-off-by: Zhang Shengju zhangshen...@cmss.chinamobile.com
---
ip/ipnetns.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/ip/ipnetns.c b/ip/ipnetns.c
index 088096f..d1af0c6 100644
--- a/ip/ipnetns.c
+++ b/ip/ipnetns.c
@@ -462,8 +462,10 @@ static int
This patch set adds some missing close() calls.
Zhang Shengju (2):
libs: close file in netns_switch()
netns: add missing file close
ip/ipnetns.c| 5 +
lib/namespace.c | 6 +++---
2 files changed, 8 insertions(+), 3 deletions(-)
--
1.8.3.1
--
To unsubscribe from this list: send
Add mising close() calls.
Signed-off-by: Zhang Shengju zhangshen...@cmss.chinamobile.com
---
lib/namespace.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/namespace.c b/lib/namespace.c
index 8197165..025ed47 100644
--- a/lib/namespace.c
+++ b/lib/namespace.c
Cut one level indentation to make things easier to read.
Signed-off-by: Zhang Shengju zhangshen...@cmss.chinamobile.com
---
ip/iplink.c | 65 +++--
1 file changed, 33 insertions(+), 32 deletions(-)
diff --git a/ip/iplink.c b/ip/iplink.c
This patch set enables bridge related links to print usage with short format.
Or else it is needed to use the following way:
ip link { add | del | set } type TYPE help
Zhang Shengju (3):
iplink: add missing link type
iplink: use the short format to print help info
iplink
Allow to print link type usage by: ip link help bridge
Signed-off-by: Zhang Shengju zhangshen...@cmss.chinamobile.com
---
ip/iplink_bridge.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/ip/iplink_bridge.c b/ip/iplink_bridge.c
index 297160c..1e69960 100644
fix a typo: noarp - arp
Signed-off-by: Zhang Shengju zhangshen...@cmss.chinamobile.com
---
ip/iplink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ip/iplink.c b/ip/iplink.c
index 7e5c466..fa8aa47 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -507,7 +507,7 @@ int
In our manual, we have this description of 'EXIT STATUS':
Exit status is 0 if command was successful, and 1 if there is a syntax
error.
But we exit in command functions with code -1 when there is a syntax error.
It's better to use return.
Signed-off-by: Zhang Shengju zhangshen
Remove dupldated include for linux/xfrm.h, since it's already
included by 'xfrm.h'.
Signed-off-by: Zhang Shengju zhangshen...@cmss.chinamobile.com
---
ip/ipxfrm.c | 1 -
ip/xfrm_monitor.c | 1 -
ip/xfrm_policy.c | 1 -
ip/xfrm_state.c | 1 -
4 files changed, 4 deletions(-)
diff --git
Replace white-spaces with tabs
Signed-off-by: Zhang Shengju zhangshen...@cmss.chinamobile.com
---
ip/ip.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ip/ip.c b/ip/ip.c
index c23de74..78134f9 100644
--- a/ip/ip.c
+++ b/ip/ip.c
@@ -64,7 +64,7 @@ static void usage(void
Make sure that return value of each socket() call is properly checked
and do not continue processing if the call failed.
Signed-off-by: Zhang Shengju zhangshen...@cmss.chinamobile.com
---
ip/tunnel.c | 24
1 file changed, 24 insertions(+)
diff --git a/ip/tunnel.c b/ip
92 matches
Mail list logo