[PATCH 1/3] bonding: do not allow rlb updates to invalid mac

2016-04-06 Thread Debabrata Banerjee
Make sure multicast, broadcast, and zero mac's cannot be the output of rlb updates, which should all be directed arps. Receive load balancing will be collapsed if any of these happen, as the switch will broadcast. Signed-off-by: Debabrata Banerjee diff --git a/drivers/net/bonding/bond_al

[PATCH 2/3] bonding: don't request extraneous rlb updates

2016-04-06 Thread Debabrata Banerjee
Don't attempt to send rlb updates for incomplete entries, which can't be sent anyway. Signed-off-by: Debabrata Banerjee diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index 1b45378..b7c7027 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/n

[PATCH 3/3] bonding: use common broadcast addr checks

2016-04-06 Thread Debabrata Banerjee
Replace homegrown broadcast checks with faster defs from etherdevice.h Signed-off-by: Debabrata Banerjee diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index b7c7027..27238f3 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c @@ -45,9

[PATCH] macvlan: Support interface operstate properly

2016-04-06 Thread Debabrata Banerjee
Set appropriate macvlan interface status based on lower device and our status. Can be up, down, or lowerlayerdown. Signed-off-by: Debabrata Banerjee diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 2bcf1f3..0f4b000 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c

[PATCH net-next v2] macvlan: Support interface operstate properly

2016-04-06 Thread Debabrata Banerjee
Set appropriate macvlan interface status based on lower device and our status. Can be up, down, or lowerlayerdown. de7d244d0 improved operstate by setting it from unknown to up, however it did not handle transferring down or lowerlayerdown. Signed-off-by: Debabrata Banerjee --- v2: Fix locking

[PATCH net-next] macvlan: Set nocarrier when lowerdev admin down

2016-04-07 Thread Debabrata Banerjee
When the lowerdev is set administratively down disable carrier on the macvlan interface. This means operstate gets set properly instead of still being "up". Signed-off-by: Debabrata Banerjee --- drivers/net/macvlan.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) di

Re: [PATCH net-next v4 1/2] fix return of iptunnel_xmit

2015-10-09 Thread Debabrata Banerjee
Andreas, I think we need to use the net_xmit defines so the errors are masked properly, how about: - if (unlikely(net_xmit_eval(err))) - pkt_len = 0; - return pkt_len; + if (likely(net_xmit_eval(err) == 0)) + return pkt_len; + else +

Re: [RFC] net: use atomic allocation for order-3 page allocation

2015-06-11 Thread Debabrata Banerjee
Resend in plaintext, thanks gmail: It's somewhat an intractable problem to know if compaction will succeed without trying it, and you can certainly end up in a state where memory is heavily fragmented, even with compaction running. You can't compact kernel pages for example, so you can end up in a

Re: [RFC] net: use atomic allocation for order-3 page allocation

2015-06-11 Thread Debabrata Banerjee
There is no "background" it doesn't matter if this activity happens synchronously or asynchronously, unless you're sensitive to the latency on that single operation. If you're driving all your cpu's and memory hard then this is work that still takes resources. If there's a kernel thread with compac

[PATCH net 0/2] bonding: bug fixes and regressions

2018-05-09 Thread Debabrata Banerjee
Fixes to bonding driver for balance-alb mode, suitable for stable. Debabrata Banerjee (2): bonding: do not allow rlb updates to invalid mac bonding: send learning packets for vlans on slave drivers/net/bonding/bond_alb.c | 15 +-- drivers/net/bonding/bond_main.c | 2

[PATCH net 1/2] bonding: do not allow rlb updates to invalid mac

2018-05-09 Thread Debabrata Banerjee
Make sure multicast, broadcast, and zero mac's cannot be the output of rlb updates, which should all be directed arps. Receive load balancing will be collapsed if any of these happen, as the switch will broadcast. Signed-off-by: Debabrata Banerjee --- drivers/net/bonding/bond_alb.c | 2

[PATCH net 2/2] bonding: send learning packets for vlans on slave

2018-05-09 Thread Debabrata Banerjee
vlan's that have not set a user mac, we can send after checking one bit. Otherwise we need send the set mac, albeit defeating rx load balancing for that vlan. Signed-off-by: Debabrata Banerjee --- drivers/net/bonding/bond_alb.c | 13 - drivers/net/bonding/bond_main.c | 2

[PATCH net-next 3/4] bonding: allow use of tx hashing in balance-alb

2018-05-11 Thread Debabrata Banerjee
The rx load balancing provided by balance-alb is not mutually exclusive with using hashing for tx selection, and should provide a decent speed increase because this eliminates spinlocks and cache contention. Signed-off-by: Debabrata Banerjee --- drivers/net/bonding/bond_alb.c | 20

[PATCH net-next 2/4] bonding: use common mac addr checks

2018-05-11 Thread Debabrata Banerjee
Replace homegrown mac addr checks with faster defs from etherdevice.h Signed-off-by: Debabrata Banerjee --- drivers/net/bonding/bond_alb.c | 28 +--- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding

[PATCH net-next 1/4] bonding: don't queue up extraneous rlb updates

2018-05-11 Thread Debabrata Banerjee
arps for incomplete entries can't be sent anyway. Signed-off-by: Debabrata Banerjee --- drivers/net/bonding/bond_alb.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index 5eb0df2

[PATCH net-next 4/4] bonding: allow carrier and link status to determine link state

2018-05-11 Thread Debabrata Banerjee
In a mixed environment it may be difficult to tell if your hardware support carrier, if it does not it can always report true. With a new use_carrier option of 2, we can check both carrier and link status sequentially, instead of one or the other Signed-off-by: Debabrata Banerjee

[PATCH net-next 0/4] bonding: performance and reliability

2018-05-11 Thread Debabrata Banerjee
Series of fixes to how rlb updates are handled, code cleanup, allowing higher performance tx hashing in balance-alb mode, and reliability of link up/down monitoring. Debabrata Banerjee (4): bonding: don't queue up extraneous rlb updates bonding: use common mac addr checks bonding: allo

[PATCH net-next v2 2/4] bonding: use common mac addr checks

2018-05-14 Thread Debabrata Banerjee
Replace homegrown mac addr checks with faster defs from etherdevice.h Note that this will also prevent any rlb arp updates for multicast addresses, however this should have been forbidden anyway. Signed-off-by: Debabrata Banerjee --- drivers/net/bonding/bond_alb.c | 28

[PATCH net-next v2 0/4] bonding: performance and reliability

2018-05-14 Thread Debabrata Banerjee
. Debabrata Banerjee (4): bonding: don't queue up extraneous rlb updates bonding: use common mac addr checks bonding: allow use of tx hashing in balance-alb bonding: allow carrier and link status to determine link state Documentation/networking/bonding.txt | 4 +-- drivers/net/bo

[PATCH net-next v2 4/4] bonding: allow carrier and link status to determine link state

2018-05-14 Thread Debabrata Banerjee
In a mixed environment it may be difficult to tell if your hardware support carrier, if it does not it can always report true. With a new use_carrier option of 2, we can check both carrier and link status sequentially, instead of one or the other Signed-off-by: Debabrata Banerjee

[PATCH net-next v2 3/4] bonding: allow use of tx hashing in balance-alb

2018-05-14 Thread Debabrata Banerjee
The rx load balancing provided by balance-alb is not mutually exclusive with using hashing for tx selection, and should provide a decent speed increase because this eliminates spinlocks and cache contention. Signed-off-by: Debabrata Banerjee --- drivers/net/bonding/bond_alb.c | 20

[PATCH net-next v2 1/4] bonding: don't queue up extraneous rlb updates

2018-05-14 Thread Debabrata Banerjee
arps for incomplete entries can't be sent anyway. Signed-off-by: Debabrata Banerjee --- drivers/net/bonding/bond_alb.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index 5eb0df2

[PATCH] Fix handling of verdicts after NF_QUEUE

2017-12-11 Thread Debabrata Banerjee
e switch() to handle verdict cases from nf_hook_slow()"). However that commit cannot be cleanly cherry-picked to v4.9 Signed-off-by: Debabrata Banerjee --- This fix is only needed for v4.9 stable since v4.10+ does not have the issue --- net/netfilter/core.c | 5 + 1 file changed, 5 in

[PATCH] Fix handling of verdicts after NF_QUEUE

2017-12-13 Thread Debabrata Banerjee
e switch() to handle verdict cases from nf_hook_slow()"). However that commit cannot be cleanly cherry-picked to v4.9 Signed-off-by: Debabrata Banerjee --- This fix is only needed for v4.9 stable since v4.10+ does not have the issue --- net/netfilter/core.c | 5 + 1 file changed, 5 in

[PATCH RFC net-next] net: vlan/macvlan: count packets properly with gso

2018-11-29 Thread Debabrata Banerjee
many other drivers that likely have a similar problem, although it is not clear how many of those could be used with gso. Perhaps all packet counting should be wrapped in a helper fn. Signed-off-by: Debabrata Banerjee --- drivers/net/macvlan.c | 2 +- net/8021q/vlan_core.c | 2 +- net/8021q

[PATCH RFC net-next v2] net: vlan/macvlan: count packets properly with gso

2018-11-29 Thread Debabrata Banerjee
cvlan. Signed-off-by: Debabrata Banerjee --- drivers/net/ethernet/intel/fm10k/fm10k_main.c | 4 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++-- drivers/net/macvlan.c | 13 - drivers/net/macvtap.c | 2 +- include/linux/if_macv

[PATCH net-next] Revert "bonding: allow carrier and link status to determine link state"

2018-05-16 Thread Debabrata Banerjee
This reverts commit 1386c36b30388f46a95100924bfcae75160db715. We don't want to encourage drivers to not report carrier status correctly, therefore remove this commit. Signed-off-by: Debabrata Banerjee --- Documentation/networking/bonding.txt | 4 ++-- drivers/net/bonding/bond_main.c

[PATCH RFC net-next 0/1] tcp: close socket without reset on incoming data

2018-05-18 Thread Debabrata Banerjee
milar patch internally for years, I think it has applications for everyone. Debabrata Banerjee (1): tcp: close socket without reset on incoming data include/linux/tcp.h | 4 +++- include/uapi/linux/tcp.h | 2 +- net/ipv4/tcp.c | 23 +-- net/ipv4/tcp_input.c

[PATCH RFC net-next 1/1] tcp: close socket without reset on incoming data

2018-05-18 Thread Debabrata Banerjee
. Signed-off-by: Debabrata Banerjee --- include/linux/tcp.h | 4 +++- include/uapi/linux/tcp.h | 2 +- net/ipv4/tcp.c | 23 +-- net/ipv4/tcp_input.c | 16 net/ipv4/tcp_minisocks.c | 15 +++ 5 files changed, 52 insertions(+), 8

[PATCH net-next] netpoll: allow cleanup to be synchronous

2018-10-12 Thread Debabrata Banerjee
Given the reason for __netpoll_free_async is it can be called when rtnl is not locked, if it is locked, we should be able to execute synchronously. CC: Neil Horman CC: "David S. Miller" Signed-off-by: Debabrata Banerjee --- net/core/netpoll.c | 5 - 1 file changed, 4 insertions(+), 1 dele

[PATCH net-next v2] netpoll: allow cleanup to be synchronous

2018-10-18 Thread Debabrata Banerjee
: Neil Horman CC: "David S. Miller" Signed-off-by: Debabrata Banerjee --- drivers/net/bonding/bond_main.c | 3 ++- drivers/net/macvlan.c | 2 +- drivers/net/team/team.c | 5 + include/linux/netpoll.h | 4 +--- net/8021q/vlan_dev.c